我有json
array
这样 - :
"custom_attributes": [
{
"attribute_code": "description",
"value": "Darkly sophisticated aromas take you into Siberia"},
{
"attribute_code": "color",
"value": "6"
},
{
"attribute_code": "options_container",
"value": "container2"
},
{
"attribute_code": "required_options",
"value": "0"
},
{
"attribute_code": "gift_message_available",
"value": "2"
},
{
"attribute_code": "brand",
"value": "Molton Brown "
},
{
"attribute_code": "supplier",
"value": "Molton Brown "
},
{
"attribute_code": "features",
"value": "Twilight "
}
]
我想通过iterator
解析它。我的密钥是attribute_code
和值。
请帮我解析。
答案 0 :(得分:1)
您的JSON无效。它应该以[从而删除用于json数组的键“custom_attributes”开始。