我的数据格式为:无法显示数据JSON
{
"_id": "593994b7163e6b0011c738cb",
"location_id": "58ec522a99da86001123ec47",
"customer_id": "premiereservices",
"user": {
"phone_num": "8587366808",
"balance": 98.05
},
"cart_total": 3,
"shopping_cart": {
"items": [
{
"barcode": "611269101713",
"description": "Red Bull Sugar Free 8.4oz",
"price": 3,
"taxable": false,
"tax_collected": 0
}
]
},
"Date": "2017-06-08T12:17:27.039Z",
"__v": 0
}
我从“shopping_cart”和“用户”是不能够迭代数据需要在这个问题上提供帮助。
谢谢。
的可能的复制[?如何获得所有属性Javascript对象的值(不知道密钥)](https://stackoverflow.com/questions/7306669/ how-to-get-all-properties-values-of-javascript-object-without-know-the-key) –
你有错误信息吗?你正在尝试迭代的代码?我们得到了什么 – Amit
@Amit我收到错误“无法读取的未定义的属性‘项目’” 我试图让shopping_cart.items数据 –