0

I want to import products from a json file. How can I read the data from the json file as array? Here is my sample json

 [
    {
    "id": 632910392,
      "title": "IPod Nano - 8GB",
      "body_html": "<p>It's the small iPod with one very big idea:</p>",
      "vendor": "Apple",
      "product_type": "Cult Products",
      "created_at": "2018-04-27T15:15:25-04:00",
      "handle": "ipod-nano",
      "updated_at": "2018-04-27T15:15:25-04:00",     
      .....
    },
    {
      "id": 921728736,
      "title": "IPod Touch 8GB",
      "body_html": "<p>The iPod Touch has the iPhone's multi-touch interface</p>",
      "vendor": "Apple",
      "product_type": "Cult Products",
      "created_at": "2018-04-27T15:15:25-04:00",
      "handle": "ipod-touch",
      "updated_at": "2018-04-27T15:15:25-04:00",
      "images": [],
    }
    ]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.