-3

This is what the object looks like:

{
  "1":{
    "zxc":"...",
    "custom_status":"...",
    "custom_status_icon":"",
    "custom_status_icon_only":0,
    "product_id":"...",
    "is_in_stock":1,
    "pricealert":""
  },
  "2":{
    "zxc":"...",
    "custom_status":"...",
    "custom_status_icon":"",
    "custom_status_icon_only":0,
    "product_id":"...",
    "is_in_stock":1,
    "pricealert":""
  }
}
mplungjan
  • 155,085
  • 27
  • 166
  • 222

1 Answers1

-1

You can use the below example to apply on your dataset:

const myObj = {
  "1": {
    "zxc": "...",
    "custom_status": "...",
    "custom_status_icon": "",
    "custom_status_icon_only": 0,
    "product_id": "...",
    "is_in_stock": 1,
    "pricealert": ""
  },
  "2": {
    "zxc": "...",
    "custom_status": "...",
    "custom_status_icon": "",
    "custom_status_icon_only": 0,
    "product_id": "...",
    "is_in_stock": 1,
    "pricealert": ""
  }
}

for (x in myObj) {
  document.getElementById("demo").innerHTML += x;
}
<div id="demo"></div>
mplungjan
  • 155,085
  • 27
  • 166
  • 222
MorLavender
  • 104
  • 1
  • 8