|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
本帖最后由 Kaohsing 于 2018-8-9 18:35 编辑
这个网址http://www.pm25.in/api/querys/pm2_5.json?city=%E5%8C%97%E4%BA%AC&token=5j1znBVAsnSf5xQyNQyq返回的数据如下
[{"aqi":49,"area":"北京","pm2_5":0,"pm2_5_24h":26,"position_name":"万寿西宫","primary_pollutant":null,"quality":"优","station_code":"1001A","time_point":"2018-08-09T16:00:00Z"},
{"aqi":92,"area":"北京","pm2_5":21,"pm2_5_24h":14,"position_name":"定陵",
"primary_pollutant":"臭氧1小时","quality":"良","station_code":"1002A","time_point":"2018-08-09T16:00:00Z"},
{"aqi":87,"area":"北京","pm2_5":0,"pm2_5_24h":20,"position_name":"东四","primary_pollutant":"臭氧1小时","quality":"良","station_code":"1003A","time_point":"2018-08-09T16:00:00Z"},{"aqi":70,"area":"北京","pm2_5":19,"pm2_5_24h":26,"position_name":"天坛","primary_pollutant":"臭氧1小时","quality":"良","station_code":"1004A","time_point":"2018-08-09T16:00:00Z"},{"aqi":113,"area":"北京","pm2_5":24,"pm2_5_24h":26,"position_name":"农展馆","primary_pollutant":"臭氧1小时","quality":"轻度污染","station_code":"1005A","time_point":"2018-08-09T16:00:00Z"},{"aqi":93,"area":"北京","pm2_5":24,"pm2_5_24h":26,"position_name":"官园","primary_pollutant":"臭氧1小时","quality":"良
","station_code":"1006A","time_point":"2018-08-09T16:00:00Z"},{"aqi":78,"area":"北京","pm2_5":21,"pm2_5_24h":23,"position_name":"海淀区万柳","primary_pollutant":"臭氧1小时","quality":"良","station_code":"1007A","time_point":"2018-08-09T16:00:00Z"},{"aqi":130,"area":"北京","pm2_5":47,"pm2_5_24h":31,"position_name":"顺义新城","primary_pollutant":"臭氧1小时","quality":"轻度污染","station_code":"1008A","time_point":"2018-08-09T16:00:00Z"},{"aqi":45,"area":"北京","pm2_5":0,"pm2_5_24h":4,"position_name":"怀柔镇","primary_pollutant":null,"quality":"优","station_code":"1009A","time_point":"2018-08-09T16:00:00Z"},{"aqi":93,"area":"北京","pm2_5":17,"pm2_5_24h":17,"position_name":"昌平镇","primary_pollutant":"臭氧1小时","quality":"良","station_code":"1010A","time_point":"2018-08-09T16:00:00Z"},{"aqi":94,"area":"北京","pm2_5":0,"pm2_5_24h":13,"position_name":"奥体中心","primary_pollutant":"臭氧1小时","quality":"良","station_code":"1011A","time_point":"2018-08-09T16:00:00Z"},{"aqi":85,"area":"北京","pm2_5":22,"pm2_5_24h"
:21,"position_name":"古城","primary_pollutant":"臭氧1小时","quality":"良","station_code":"1012A","time_point":"2018-08-09T16:00:00Z"},{"aqi":90,"area":"北京","pm2_5":24,"pm2_5_24h":20,"position_name":null,"primary_pollutant":"臭氧1小时","quality":"良","station_code":null,"time_point":"2018-08-09T16:00:00Z"}]
这里面没有叫“code”的键,所以这一句通不过b=a.code.split(',');就出错
|
|