json Object access properties problem
i've a problem with json object (created from java Object1) that contains a List of Object2... i cannot access to the value of the object2 in the list og object1..
the json Object is
{
"object": {
"idItemGroup": "45",
"path": "1",
"dealer": "6",
"refIdMacroItemGroup": "6",
"description": "kb4",
"price": "5.5",
"qty": "1",
"itms": {
"@class": "list",
"ecomm.datamodel.ItemModify": [
{
"isDeleted": "false",
"isAdded": "false",
"idItem": "14",
"idLabel": "10029",
"label": "kb3",
"price": "5.5",
"dealer": "6",
"refItemGroup": "45"
},
{
"isDeleted": "false",
"isAdded": "false",
开发者_运维技巧 "idItem": "12",
"idLabel": "10025",
"label": "kc1",
"price": "5.5",
"dealer": "6",
"refItemGroup": "45"
}
]
}
}
}
but in js i can only get itms object? thanks in advance.
jsonObject.object.description (kb4 )
how i can get the value of idLabel in
labels = []
var items = jsonObject.object.itms["ecomm.datamodel.ItemModify"];
for(var i = 0; i < items.length; i++)
{
labels.push(items[i].idLabel);
}
That is some really ugly JSON, particularly (but not only) the key with embedded periods.
精彩评论