Reputation: 353
I have this component Component (codesandbox.io) and i´m trying to pass
const Example which is an example of the data structure i´m passing to the component.
const EXAMPLE = [
{data: '2018-03-22', status: 'status', statusB: 'Ready for Dev', StatusE: 'In Progress'},
{data: '2018-03-23', status: 'status', statusB: 'In Progress', statusE: 'Done'},
]
I could make a new array with the Data property only, but i also need
{statusB} -> {StatusE}
as you can see on the image below
This is what i´m trying to achieve:
Upvotes: 0
Views: 5419
Reputation: 1478
Just map your data
inside the EXAMPLE
array, like this codesandbox
values={EXAMPLE.map(x => x.data)}
Upvotes: 1