|
50精币
例如,这是一段 JSON 文本:
[JavaScript] 纯文本查看 复制代码 {
"images": [{
"startdate": "20241109",
"fullstartdate": "202411091600",
"enddate": "20241110",
"url": "/th?id=OHR.YucatanFlamingos_ZH-CN0721673752_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp",
"urlbase": "/th?id=OHR.YucatanFlamingos_ZH-CN0721673752",
"copyright": "加勒比火烈鸟,尤卡坦半岛,墨西哥 (? Claudio Contreras/NPL/Minden Pictures)",
"copyrightlink": "https://www.bing.com/search?q=%E5%8A%A0%E5%8B%92%E6%AF%94%E7%81%AB%E7%83%88%E9%B8%9F&form=hpcapt&mkt=zh-cn",
"title": "飞行中的火烈鸟",
"quiz": "/search?q=Bing+homepage+quiz&filters=WQOskey:%22HPQuiz_20241109_YucatanFlamingos%22&FORM=HPQUIZ",
"wp": true,
"hsh": "41a3d8fd63bc1199417c358d81ac59c5",
"drk": 1,
"top": 1,
"bot": 1,
"hs": []
}, {
"startdate": "20241108",
"fullstartdate": "202411081600",
"enddate": "20241109",
"url": "/th?id=OHR.MoroccoMilkyWay_ZH-CN3544344290_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp",
"urlbase": "/th?id=OHR.MoroccoMilkyWay_ZH-CN3544344290",
"copyright": "银河,阿伊特本哈杜杜,摩洛哥 (? Cavan Images/Getty Images)",
"copyrightlink": "https://www.bing.com/search?q=%E9%98%BF%E4%BC%8A%E7%89%B9%E6%9C%AC%E5%93%88%E6%9D%9C%E6%9D%9C&form=hpcapt&mkt=zh-cn",
"title": "红尘中的宇宙美景",
"quiz": "/search?q=Bing+homepage+quiz&filters=WQOskey:%22HPQuiz_20241108_MoroccoMilkyWay%22&FORM=HPQUIZ",
"wp": true,
"hsh": "9b52869e5e34425abc99fc977239efe0",
"drk": 1,
"top": 1,
"bot": 1,
"hs": []
}, {
"startdate": "20241107",
"fullstartdate": "202411071600",
"enddate": "20241108",
"url": "/th?id=OHR.GlacialRivers_ZH-CN0260507556_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp",
"urlbase": "/th?id=OHR.GlacialRivers_ZH-CN0260507556",
"copyright": "冰岛冰川河流鸟瞰图 (? rybarmarekk/Shutterstock)",
"copyrightlink": "https://www.bing.com/search?q=%E5%86%B0%E5%B2%9B%E5%86%B0%E5%B7%9D%E6%B2%B3%E6%B5%81&form=hpcapt&mkt=zh-cn",
"title": "来自冰与火之国",
"quiz": "/search?q=Bing+homepage+quiz&filters=WQOskey:%22HPQuiz_20241107_GlacialRivers%22&FORM=HPQUIZ",
"wp": true,
"hsh": "0129edb52d00dbac477c31666496a402",
"drk": 1,
"top": 1,
"bot": 1,
"hs": []
}, {
"startdate": "20241106",
"fullstartdate": "202411061600",
"enddate": "20241107",
"url": "/th?id=OHR.LiDong2024_ZH-CN9944723194_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp",
"urlbase": "/th?id=OHR.LiDong2024_ZH-CN9944723194",
"copyright": "金色的松树,坝上草原,中国 (? MelindaChan/Getty Images)",
"copyrightlink": "https://www.bing.com/search?q=%E5%86%85%E8%92%99%E5%8F%A4%E5%9D%9D%E4%B8%8A%E8%8D%89%E5%8E%9F&form=hpcapt&mkt=zh-cn",
"title": "初冬之美",
"quiz": "/search?q=Bing+homepage+quiz&filters=WQOskey:%22HPQuiz_20241106_LiDong2024%22&FORM=HPQUIZ",
"wp": true,
"hsh": "a476442315b77efb1638bf57bd111426",
"drk": 1,
"top": 1,
"bot": 1,
"hs": []
}, {
"startdate": "20241105",
"fullstartdate": "202411051600",
"enddate": "20241106",
"url": "/th?id=OHR.ShiShiBeach_ZH-CN8685799566_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp",
"urlbase": "/th?id=OHR.ShiShiBeach_ZH-CN8685799566",
"copyright": "奥林匹克国家公园石狮海滩,华盛顿州,美国 (? T.M. Schultze/TANDEM Stills + Motion)",
"copyrightlink": "https://www.bing.com/search?q=%E5%A5%A5%E6%9E%97%E5%8C%B9%E5%85%8B%E5%9B%BD%E5%AE%B6%E5%85%AC%E5%9B%AD&form=hpcapt&mkt=zh-cn",
"title": "日落的阴影",
"quiz": "/search?q=Bing+homepage+quiz&filters=WQOskey:%22HPQuiz_20241105_ShiShiBeach%22&FORM=HPQUIZ",
"wp": true,
"hsh": "3d7167f0d1c15d7f533df550b3dd44da",
"drk": 1,
"top": 1,
"bot": 1,
"hs": []
}, {
"startdate": "20241104",
"fullstartdate": "202411041600",
"enddate": "20241105",
"url": "/th?id=OHR.LencoisMaranhao_ZH-CN8194406488_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp",
"urlbase": "/th?id=OHR.LencoisMaranhao_ZH-CN8194406488",
"copyright": "马拉赫塞斯国家公园,马拉尼昂州,巴西 (? thanosquest/Shutterstock)",
"copyrightlink": "https://www.bing.com/search?q=%E9%A9%AC%E6%8B%89%E8%B5%AB%E5%A1%9E%E6%96%AF%E5%9B%BD%E5%AE%B6%E5%85%AC%E5%9B%AD&form=hpcapt&mkt=zh-cn",
"title": "异世界之美",
"quiz": "/search?q=Bing+homepage+quiz&filters=WQOskey:%22HPQuiz_20241104_LencoisMaranhao%22&FORM=HPQUIZ",
"wp": true,
"hsh": "7edbe596415aa1aea3047d5ce6d15a33",
"drk": 1,
"top": 1,
"bot": 1,
"hs": []
}, {
"startdate": "20241103",
"fullstartdate": "202411031600",
"enddate": "20241104",
"url": "/th?id=OHR.CumbriaAutumn_ZH-CN7697251216_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp",
"urlbase": "/th?id=OHR.CumbriaAutumn_ZH-CN7697251216",
"copyright": "坎布里亚湖区,格拉斯米尔,英格兰 (? Thomas Molyneux/Getty Images)",
"copyrightlink": "https://www.bing.com/search?q=%E6%A0%BC%E6%8B%89%E6%96%AF%E7%B1%B3%E5%B0%94&form=hpcapt&mkt=zh-cn",
"title": "胜过千言万语",
"quiz": "/search?q=Bing+homepage+quiz&filters=WQOskey:%22HPQuiz_20241103_CumbriaAutumn%22&FORM=HPQUIZ",
"wp": true,
"hsh": "d1ff5f1ecbabdfe21a7b25b030732366",
"drk": 1,
"top": 1,
"bot": 1,
"hs": []
}, {
"startdate": "20241102",
"fullstartdate": "202411021600",
"enddate": "20241103",
"url": "/th?id=OHR.YucatanBiosphere_ZH-CN7442392453_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp",
"urlbase": "/th?id=OHR.YucatanBiosphere_ZH-CN7442392453",
"copyright": "巢中的加勒比火烈鸟蛋,里奥拉加托斯自然保护区,尤卡坦州,墨西哥 (? Claudio Contreras/Minden Pictures)",
"copyrightlink": "https://www.bing.com/search?q=%E9%87%8C%E5%A5%A5%E6%8B%89%E5%8A%A0%E6%89%98%E6%96%AF%E8%87%AA%E7%84%B6%E4%BF%9D%E6%8A%A4%E5%8C%BA&form=hpcapt&mkt=zh-cn",
"title": "自然与可持续发展的结合",
"quiz": "/search?q=Bing+homepage+quiz&filters=WQOskey:%22HPQuiz_20241102_YucatanBiosphere%22&FORM=HPQUIZ",
"wp": true,
"hsh": "6b5fbc0c6e26a86945bd9d77ce37050d",
"drk": 1,
"top": 1,
"bot": 1,
"hs": []
}],
"tooltips": {
"loading": "正在加载...",
"previous": "上一个图像",
"next": "下一个图像",
"walle": "此图片不能下载用作壁纸。",
"walls": "下载今日美图。仅限用作桌面壁纸。"
}
}
如何取数组里面的所有属性?并且存储在一个变量(可为数组)中?
|
最佳答案
查看完整内容
[e=0].版本 2
.支持库 spec
.子程序 _按钮1_被单击
.局部变量 json, 类_json
.局部变量 n, 整数型
.局部变量 成员名, 文本型, , "0"
.局部变量 q, 整数型
json.解析 (#常量1)
.计次循环首 (json.成员数 (“images”), n)
json.取所有属性名 (成员名, “images[” + 到文本 (n - 1) + “]”)
.计次循环首 (取数组成员数 (成员名), q)
调试输出 (成员名 [q], json.取通用属性 (“images[” + 到文本 (n - 1) ...
|