请在我的 ajax 端获取以下 json 字符串:
{
"products": [
{
"id": 48,
"quantity": 1,
"priceByLine": "950,00 €",
"name": "Filtre Mixte",
"price": "950,00 €"
}],
"total": "950,00 €",
"productTotal": "950,00 €"
}
要获得总价,我只需要做:
alert(data.total);
但是当我想获得 ID 时,我会:
alert(data.products.id);
它给了我undefined!
请问各位高手,我该怎么办才能拿到身份证?
提前致谢 !