I'm trying to get the keys of Object.keys all into one array but am having some difficulty.
Currently Im trying this but I get an array of each of the Object keys
Object.keys(myObject).map(x=>Object.keys(myObject[x]))
Object:
{
"a1G0R000002Sv15UAC":{
"a1K0R000000ytEsUAI":{ <---
"test2_2":"test2"
}
},
"a1G0R000002SvdYUAS":{
"a1K0R000000yu8EUAQ":{ <---
"test2_2":"test2"
},
"a1K0R000000ytEsUAI":{ <---
"string_1":"test"
}
},
"a1G0R000002T4NIUA0":{
"a1K0R000000ytEsUAI":{ <---
"string_1":"test"
}
}
}
Desired array: ["a1K0R000000ytEsUAI","a1K0R000000yu8EUAQ","a1K0R000000ytEsUAI","a1K0R000000ytEsUAI"]