how to get value from object array in javascript code example
Example 1: how to get array from object in javascript
let result = objArray.map(({ foo }) => foo)
Example 2: object get array of values
const data = {
"2015": {
"year": 2015,
"cover": {}
}
}
Object.entries(data).forEach(([key, value]) => console.log(key, value));