我有一个json:
{
"pType": "1",
"pTitle": "A Product",
"pProds": [{
"formM": 1,
"sDesc": "A Product",
"lDesc": "A Product",
"pColor": "#000000",
"pSize": "L",
"postage": "2",
"quatity": 2,
"aPrice": "2",
"rPrice": "2",
"Discounted": "2",
"Price": "2",
"p_Num": "466ff237439a44be9d8fcc4725c28e4c",
"images": [{
"mN": 1,
"idImage": "image1",
"fileName": "39b06cc1aeb94e0c868d9b4e8174e2d5.jpeg",
"bytes": "/img/ProdImages/466ff237439a44be9d8fcc4725c28e4c/39b06cc1aeb94e0c868d9b4e8174e2d5.jpeg"
}]
}, {
"formM": 0,
"sDesc": "",
"lDesc": "",
"pColor": "",
"pSize": "0",
"postage": "0",
"quatity": 0,
"aPrice": "0",
"rPrice": "0",
"Discounted": "0",
"Price": "0",
"p_Num": "b8cf1caa638b48a2a3111b6d78c90b74",
"images": []
}]
}
我想做的是用一个给定的id更新quantity(missspelled)值,这个id是p\num。
所以如果我需要通过p_num等于'466ff237439a44be9d8fcc4725c28e4c'将quantity从2更新到55
我该如何做到这一点?
暂无答案!
目前还没有任何答案,快来回答吧!