0

I have a json array like this -:

"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 "
            }
        ]

I want to parse it through iterator. My keys are attribute_code and value.

Please help me for this parsing.

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115

1 Answers1

1

Your JSON is invalid. It should be starting with [ so just remove the key "custom_attributes" used for json array.