我是新手,我了解如何將 json 數(shù)據(jù)編組為自定義的預(yù)定義 Struct 類型,但我目前正在使用 JSON 集,該集可以在每次調(diào)用時(shí)具有動(dòng)態(tài)鍵和值。我可以將這些動(dòng)態(tài)數(shù)據(jù)編組到地圖/界面中,這沒問題,但我對(duì)如何訪問深度嵌套在數(shù)組中的項(xiàng)目有點(diǎn)迷茫。這是我在 USDOL 網(wǎng)站上使用的示例 JSON { "name": "osha-establishment", "count": 15, "frequency": "Manual Crawl", "version": 4, "newdata": true, "lastrunstatus": "success", "lastsuccess": "Mon Dec 08 2014 11:19:57 GMT+0000 (UTC)", "thisversionstatus": "success", "results": { "est_search": [ { "est_name": "Chipotle Mexican Grill", "state": "MN", "activity": { "href": "https://www.osha.gov/pls/imis/establishment.inspection_detail?id=317911832", "text": "317911832" }, "opened": "11/20/2014", "rid": "0552700", "type": "Complaint", "sc": "Partial", "sic": { "href": "https://www.osha.gov/pls/imis/sic_manual.display?id=44&tab=description", "text": "5812" }, "naics": "722110", "vio": "" }, } ] } }我想訪問sic此 JSON 集中鍵的值。
- 1 回答
- 0 關(guān)注
- 150 瀏覽
添加回答
舉報(bào)
0/150
提交
取消