Saturday 25 March 2017

javascript - Foreach JSON with random keys

I currently experience the problem when i want to deserialize json. I dont know how to do this with unknown keys



[
{
"84.200.222.4": [
0.022
]
},

{
"84.200.230.82": [
1.315
]
},
{
"80.156.160.161": [
0.874
]
},

{
"72.14.217.108": [
0.662
]
},
{
"108.170.251.193": [
0.638
]
},

{
"216.239.54.61": [
0.64
]
},
{
"172.217.23.131": [
0.564
]
}

]


How would i go about this when i want



1. 84.200.222.4
- 0.022

2. 84.200.230.82
- 1,315


3. 80.156.160.161
- 0.874

4 72.14.217.108
- 0.662


Etc.. I'm currently not sure on how to loop through unknown keys is that possible?

No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...