Reputation: 177
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
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