The returned json format is {"desc":"OK","status":1000,"data":{"wendu":"17","type": "clear", "yesterday" :{"wendu": "20", "type":"Cloudy"},"city":"Beijing"}}
registerData.wendu can be displayed normally, but registerData.yesterday.type reports an error
给我你的怀抱2017-05-19 10:40:14
Your json format is not legal at all.
Let you change his code in the background, the format is wrong
The data can be extracted according to the format you provided later. You can console.log() to output your registerData.
Maybe there is an extra layer of data inside
给我你的怀抱2017-05-19 10:40:14
The brackets are wrong. . The additional json should be in double quotes
PHP中文网2017-05-19 10:40:14
Single quotes cannot be used in JSON
{"data": {{"wendu": "17", "type": "晴"}, "yesterday": {"wendu": "20", "type": "多云"}}