I have stored some data as a JSON. Data is coming dynamically. Even the key name could be changed.
var str = {
"Product_row_1": {
"Number_of_Students": {
190: 191
},
"Price": {
240.0000: 230.0000
},
"Total_Old": {
"45.00000": "43.00000"
}
},
"Cost": {
45.00: 43.00
},
"Cost_after": {
45.00: 43.00
},
"Total": {
45.00: 43.00
},
"Cover_Letter": {
"<div>Hello<\/div>": ""
},
"Additional_Information": {
"<div>Hell No<\/div>": ""
}
}
Now I want to access it's all keys and values. I'm trying JSON.parse() but it's giving error "Unexpected number in JSON at position 40". I tried this with $.getJSON(Json, function (key, value).That's also not working.
Can someone please help ? I just want to access each key, value and inside JSON ( {"Product_row_1":{"aa":"bb"}} ) as well.