Javascript – Iterate Nested Object based on each Index
const networkChart = NodeClassification; const itemKey = Object.values(networkChart).map((x) => Object.keys(x)[0]) const itemKey1 = Object.values(networkChart).map((x) => Object.values(x)[0]) itemKey1.map((item, index) => { return ( item.group = itemKey[index], item.Vendor = Object.keys(networkChart)[index] ) }) // itemKey1.map((item, index) => { // item.group = itemKey[index].toUpperCase() //…