I have below JSON defined in the below manner of set, key and value.
[{
"set1": {
"key1": "value1"
},
"set2": {
"key2": "value2"
},
"set3": {
"key3": "value3"
},
"set4": {
"key4": "value4"
}
}]
I would like to know how do I use plain/native javascript to get the array of strings in the below manner which consists of only various values.
["value1","value2","value3","value4"]
I have tried using Object.keys and Object.values but still no luck. It would be helpful to know how to handle it in plain javascript and not use any third party libraries.