I have tried to take the particular array value of key from a JSON object and store that in an array which will be look like this.
Example:
var obj = { "1":{"class":2,"percent":0.99,"box":[0.2,0.3,0.4,0.5]},
"2":{"class":2,"percent":0.99,"box":[0.12,0.23,0.45,0.56]},
"3":{"class":2,"percent":0.99,"box":[0.52,0.83,0.34,0.59]}
}
and so on like this
Now i need to take the value of key "box" and store in an array.
var list = []
list = [[0.2,0.3,0.4,0.5],[0.12,0.23,0.45,0.56],[0.52,0.83,0.34,0.59]]
But, i tried multiple ways to store the array inside the array, but i could able to get like this when i printed the list
list = 0.2,0.3,0.4,0.5,0.12,0.23,0.45,0.56,0.52,0.83,0.34,0.59