I have this object value
var data = {
"questions": {
"0": {
"0": "17",
"1": "12"
},
"1": {
"0": "22",
"1": "34"
},
"2": {
"0": "52",
"1": "61"
}
}
}
I am trying to get value from these objects as I have tried below things which return me other than what I actually want.
alert(Object.keys(data.questions[0])); // Output : 0,1
alert(Object.keys(data.questions[0][0])); // Output : 0
alert(Object.keys(data.questions[0][1])); // Output : 0
Anyone can help me find the value of above keys like:
questions[0][0] = 17
questions[0][1] = 12
Object.keys(data.questions[0][0])? wheredata.questions[0][0]is17so what you meant withObject.keys(17)?Object.keys(...)is working for me for count total question and also total parameter in one question now I want to get the value of parameter 0 and parameter 1. Where I am stuck right now.