|
5精币
{"data":[{"name":"春姑娘","pictures":[{"url":"http:\/\/pinduoduoimg.yangkeduo.com\/review\/2017-10-15\/cf8cda071dae8c5df7a4727a8f139631.jpeg","width":1040,"height":780}],"uid":5697917450,"time":1508059861,"stars":0,"comment":"运输中没有破损。看着不错,不知道炖汤出来味道怎么样了。","avatar":"http:\/\/avatar.yangkeduo.com\/a\/2ef2e6fdec6ca02c90760bacb58568184f97c86c-1507935996?x-oss-process=image\/resize,w_100","specs":"[{\"spec_id\":11794533,\"spec_key\":\"颜色\",\"spec_value\":\"蓝色(一锅3胆)\"}]"},{"name":"好好地???","uid":6024995771,"time":1508155814,"stars":0,"comment":"商品漂亮,不过可能对我来说小了点,","avatar":"http:\/\/avatar.yangkeduo.com\/a\/0e439f93bf08e6b22f47b02ca494e3a3782e1912-1504580507?x-oss-process=image\/resize,w_100","specs":"[{\"spec_id\":11794407,\"spec_key\":\"颜色\",\"spec_value\":\"咖啡金(一锅2胆)\"}]"},{"name":"牵挂","uid":3905849489,"time":1508076092,"stars":0,"comment":"今天到了就试用了不错就是太小了","avatar":"http:\/\/wx.qlogo.cn\/mmopen\/ajNVdqHZLLDLuFC7gR9wEric5O7sgYO9VJtdSDGPRKFrMcWbUp65d2uQIusicVpcjwNq4F5guKgicvZGHPSGkJUr0lDW8p92S2NxU3y1ZRgyVw\/0","specs":"[{\"spec_id\":11794407,\"spec_key\":\"颜色\",\"spec_value\":\"咖啡金(一锅2胆)\"}]"},{"name":"知足常乐","uid":3586419831,"time":1508151611,"stars":0,"comment":"好","avatar":"http:\/\/avatar.yangkeduo.com\/a\/4eb3e198739f66b6e793e3613b9851daa66da399-1506378792?x-oss-process=image\/resize,w_100","specs":"[{\"spec_id\":11794484,\"spec_key\":\"颜色\",\"spec_value\":\"咖啡金(一锅3胆)\"}]"},{"name":"三木","uid":5959737472,"time":1507557434,"stars":0,"comment":"二次购买,说明了一个字:好好好。","avatar":"http:\/\/avatar.yangkeduo.com\/a\/81a54d74db3a7410515359c792f0135a4cd82a0e-1503565817?x-oss-process=image\/resize,w_100","specs":"[{\"spec_id\":11794407,\"spec_key\":\"颜色\",\"spec_value\":\"咖啡金(一锅2胆)\"}]"},{"name":"L w","uid":4878958862,"time":1507977626,"stars":0,"comment":"炖锅很好","avatar":"http:\/\/avatar.yangkeduo.com\/a\/40ff935791b1d8c6a52c4ca711c2a353fd3acccd-1504097404?x-oss-process=image\/resize,w_100","specs":"[{\"spec_id\":11794484,\"spec_key\":\"颜色\",\"spec_value\":\"咖啡金(一锅3胆)\"}]"},{"name":"散逸燕子","uid":4457998276,"time":1507874702,"stars":0,"comment":"很不错","avatar":"http:\/\/avatar.yangkeduo.com\/a\/b49e12ba49205fbefb50a2f671e5d40d0675c5d0-1503358847?x-oss-process=image\/resize,w_100","specs":"[{\"spec_id\":11794407,\"spec_key\":\"颜色\",\"spec_value\":\"咖啡金(一锅2胆)\"}]"},{"name":"阳江鲜果????芬芬??","uid":3924087459,"time":1507777129,"stars":0,"comment":"好用","avatar":"http:\/\/avatar.yangkeduo.com\/a\/57b1d7c1eb89b2e82a00f6be6eee7e8d1408d7f1-1501848484?x-oss-process=image\/resize,w_100","specs":"[{\"spec_id\":11794407,\"spec_key\":\"颜色\",\"spec_value\":\"咖啡金(一锅2胆)\"}]"},{"name":"明天会更好","uid":3978834100,"time":1507884100,"stars":0,"comment":"有点小","avatar":"http:\/\/avatar.yangkeduo.com\/a\/6324d53b0adf0121a2b29d61607d376672bb7df1-1506314741?x-oss-process=image\/resize,w_100","specs":"[{\"spec_id\":11794594,\"spec_key\":\"颜色\",\"spec_value\":\"红色(一锅3胆)\"}]"},{"name":"刘啥","uid":4268862273,"time":1507273178,"stars":0,"comment":"货收到,完好,待用过再来评价","avatar":"http:\/\/avatar.yangkeduo.com\/a\/d3e0301d7b24dc1d379dac8726208ea8659ddbc5-1504854522?x-oss-process=image\/resize,w_100","specs":"[{\"spec_id\":11794533,\"spec_key\":\"颜色\",\"spec_value\":\"蓝色(一锅3胆)\"}]"},{"name":"方方","uid":3762250242,"time":1506957064,"stars":0,"comment":"很好用,烫煲出来味道很好!","avatar":"http:\/\/avatar.yangkeduo.com\/a\/45d774f0107435d6a882033a8e2f2c6bc2bd15a1-1503932238?x-oss-process=image\/resize,w_100","specs":"[{\"spec_id\":11794407,\"spec_key\":\"颜色\",\"spec_value\":\"咖啡金(一锅2胆)\"}]"},{"name":"七星??瓢虫","uid":4807959188,"time":1507042948,"stars":0,"comment":"感觉有点小","avatar":"http:\/\/avatar.yangkeduo.com\/a\/2c18083155ae2da378de37daeeed762d3fe131b9-1505231306?x-oss-process=image\/resize,w_100","specs":"[{\"spec_id\":11794484,\"spec_key\":\"颜色\",\"spec_value\":\"咖啡金(一锅3胆)\"}]"},{"name":"女人花","uid":5308914921,"time":1506744882,"stars":0,"comment":"还可以","avatar":"http:\/\/avatar.yangkeduo.com\/a\/4804ebd2e291901007cdc61a363b64dc03a77328-1504719198?x-oss-process=image\/resize,w_100","specs":"[{\"spec_id\":11794484,\"spec_key\":\"颜色\",\"spec_value\":\"咖啡金(一锅3胆)\"}]"},{"name":"A乐乐","uid":4766370863,"time":1506307068,"stars":0,"comment":"特别棒,很实用,很满意!","avatar":"http:\/\/avatar.yangkeduo.com\/a\/61d8a1566285ecb482a5eabe3c3019771bf3ef27-1505786036?x-oss-process=image\/resize,w_100","specs":"[{\"spec_id\":11794484,\"spec_key\":\"颜色\",\"spec_value\":\"咖啡金(一锅3胆)\"}]"},{"name":"一笑而过","uid":2887657940,"time":1505916163,"stars":0,"comment":"昨天收到没时间评价,送人的很好用。我个人超喜欢","avatar":"http:\/\/avatar.yangkeduo.com\/a\/aa4b13663789e8348ab4a8c29d16a7823e64f22a-1501983257?x-oss-process=image\/resize,w_100","specs":"[{\"spec_id\":11794407,\"spec_key\":\"颜色\",\"spec_value\":\"咖啡金(一锅2胆)\"}]"},{"time":1505816478,"name":"龙仔仔","uid":4309145828,"append":{"comment":"这个产品很喜欢,炖的时候也是静音的做的东西也好吃,比起我以前买的那个又贵又是叮咚叮咚声音,","time":1506054795},"stars":0,"comment":"物流很快,快递哥也很赞,很喜欢商家的服务","avatar":"http:\/\/avatar.yangkeduo.com\/a\/fdeb054ee630d2fd6e492a053e0500d70acdbb63-1500541147?x-oss-process=image\/resize,w_100","specs":"[{\"spec_id\":11794407,\"spec_key\":\"颜色\",\"spec_value\":\"咖啡金(一锅2胆)\"}]"},{"name":"天涯","uid":3619345619,"time":1505960468,"stars":0,"comment":"二次购买,给邻居买的,好评","avatar":"http:\/\/avatar.yangkeduo.com\/a\/df5d74b3e063227322386852a3114e5818455887-1508055842?x-oss-process=image\/resize,w_100","specs":"[{\"spec_id\":11794407,\"spec_key\":\"颜色\",\"spec_value\":\"咖啡金(一锅2胆)\"}]"},{"name":"赤天使","uid":3783066692,"time":1505730000,"stars":0,"comment":"外观满意,还没用,希望能方便使用","avatar":"http:\/\/wx.qlogo.cn\/mmopen\/eTBFF2uBxbDz4AFZdG2iazZ2hgveP21rCtJyuMdfflxbXwdRjTgea6DicGIPJTAibHKfvdrn4YiaRs4KcxBx8T95FSgX29giaE4l9\/0","specs":"[{\"spec_id\":11794356,\"spec_key\":\"颜色\",\"spec_value\":\"浅灰色(一锅2胆)\"}]"},{"name":"半夏如烟","uid":3859729652,"time":1505306093,"stars":0,"comment":"很不错的,晚上把食材放进去,早上不用起早做饭啦,好开心","avatar":"http:\/\/avatar.yangkeduo.com\/a\/5d5e1fab587558fb29292b624eb05c4793d6c70c?x-oss-process=image\/resize,w_100","specs":"[{\"spec_id\":11794515,\"spec_key\":\"颜色\",\"spec_value\":\"粉色(一锅3胆)\"}]"},{"name":"150****8894","uid":4764453434,"time":1505743268,"stars":0,"comment":"还可以,质量很棒棒!","avatar":"http:\/\/pinduoduoimg.yangkeduo.com\/avatar\/default\/5.png","specs":"[{\"spec_id\":11794533,\"spec_key\":\"颜色\",\"spec_value\":\"蓝色(一锅3胆)\"}]"}],"server_time":1508162969}
JSON.解析 (str)
JSON.取通用属性 (“data[” + 到文本 (i - 1) + “].specs”)
"specs":"[{\"spec_id\":11794533,\"spec_key\":\"颜色\",\"spec_value\":\"蓝色(一锅3胆)\"}]"
这块能怎么取?我试了不行
JSON.取通用属性 (“data[” + 到文本 (i - 1) + “].specs[” + 到文本 (n-1) + “].spec_id”)
|
最佳答案
查看完整内容
因为这个specs里面不是对象 是值 仔细看 有双引号
,"specs":"[ 冒号后面 有双引号就是值
"pictures":[ 无双引号就是对象
specs 解析出来后 直接再次解析 因为是一个数组 直接[0].属性名 解析即可
|