我已經捕捉到了一個猛砸變量下面的命令輸出:如何從Bash中的JSON對象提取數據?
{"app_versions":[{"version":"16125","shortversion":"4.4.0","title":"App 1","timestamp":1377277516,"appsize":46110031,"mandatory":false,"minimum_os_version":"6.0","device_family":"iPhone/iPod","id":22,"app_id":25196,"download_url":"https://rink.hockeyapp.net/apps/b5dc72777668ca5716aa6aec8237058f/app_versions/22","status":2,"tags":["alpha"]},{"version":"16126","shortversion":"4.4.0","title":"App 1","timestamp":1377177516,"appsize":46330031,"mandatory":false,"minimum_os_version":"6.0","device_family":"iPhone/iPod","id":20,"app_id":25190,"download_url":"https://rink.hockeyapp.net/apps/b5dc72777668ca5716aa6aec8237058f/app_versions/20","status":2,"tags":["alpha"]}
如何從上面的輸出找到的id
的最高值,並獲得相關version
?
哪「外殼」在哪個操作系統? –
你好,謝謝你的回覆。我在Mac OS中使用Bash。 – Rocky
我編輯了你的問題,明確提到JSON。如果您沒有意識到這個輸出是JSON格式,那麼我建議您使用Google的'JSON'來了解格式(及相關工具)。 – ruakh