This is an example for looping JSON structure and reading values.
var s = [{key:1,value:"abc"},{key:2,value:"def"},{key:3,value:"xyz"},{key:1,value:"pqr"}]
for(var i in s)
console.log ("Key :" + s[i].key + " - Value :" + s[i].value)
//Output
Key :1 - Value :abc
Key :2 - Value :def
Key :3 - Value :xyz
Key :1 - Value :pqr
var s = [{key:1,value:"abc"},{key:2,value:"def"},{key:3,value:"xyz"},{key:1,value:"pqr"}]
for(var i in s)
console.log ("Key :" + s[i].key + " - Value :" + s[i].value)
//Output
Key :1 - Value :abc
Key :2 - Value :def
Key :3 - Value :xyz
Key :1 - Value :pqr