kenny229
kenny229

Reputation: 177

How to massage redux data into props in react

I am trying to massage some redux data into the props of a child component. The issue is that I am not sure how to do so with this type of data. I would just like to grab the first exchange there is from the data returned in redux.

Upvotes: 0

Views: 144

Answers (1)

anuragb26
anuragb26

Reputation: 1475

You can just take the first element of the Object.keys array & use it as a key.

this.props.exchangeMarketsData[Object.keys(this.props.exchangeMarketsData)[0]]

Upvotes: 1

Related Questions