Im downloading with axios a backend structure data.
I have something like this: advancedProfile.technologies (array with 5 objects)with keys {title, link, category, date, id}).
and then im rendering a divs with use of map.
The code line is like this :
{download.data.advancedProfile.technologies.map(obj=><div>{obj.title}</div>)}
With this line I can render all 5 objects from array, but only with one key value.
I am absent-minded, but how i can just map and get all 5 objects with all keys at once ? I dont want to copy and paste all key values separetely.
If you only need values:
{download.data.advancedProfile.technologies.map(obj => (
<div>
{Object.values(obj).map(value => <div>{value}</div>)
</div>
))}
If you need keys and values:
{download.data.advancedProfile.technologies.map(obj => (
<div>
{Object.entries(obj).map(([key, value])=> <div>{key}: {value}</div>)
</div>
))}