jeudi 5 février 2015

Adding extra values in json object


For Example


I have Object named tempobj and below are tempobj[0] and tempobj[1] sample data.


I want to add extra info like name and status this object



tempobj ["info"]["name"] = "title";
tempobj ["info"]["id"] = "23243";


But when i do stringify , Jquery is ignoring this value...how can i add data like this to this kind of structure.



[
[{
"name": "Breakfast",
"value": "buffalo strip ",
"check": 0
}, {
"name": "snack ",
"value": "pecan pie butter",
"check": 0
}, {
"name": "dessert",
"value": "chocolate zucchani brownie",
"check": 0
}],
[{
"name": "Breakfast",
"value": "Stir Fried Kale and Baccon ",
"check": 1
}, {
"name": "snack ",
"value": "Smoked Salmon nori roll "
}, {
"name": "dessert",
"value": "Apple muffins"
}]




Aucun commentaire:

Enregistrer un commentaire