Input-
{
"0": {
"NAME": "ABC"
},
"1": {
"NAME": "DEF"
},
"2": {
"NAME": "GHI"
},
"3": {
"NAME": "JKL"
},
"4": {
"NAME": "MNO"
}
}
I have this input. I want to get only names in array format like this Output-
["ABC", "DEF", "GHI", "JKL", "MNO"].
try
var arr =[]; for( var i in data ) { if (data.hasOwnProperty(i)){ arr.push(data[i]); } }