2015-07-09 15 views
0

我想在下面的json文件上運行JSONPath並提取所有IP地址(ip_prefix :)其中區域等於「region:」ap-southeast-1「」JSONPath提取字符串「其中」JSON文件

https://ip-ranges.amazonaws.com/ip-ranges.json

我的xpath技能很生疏,我的JSONPath技能都是新手!

+1

顯示你已經嘗試了,我們可以告訴你,你在做什麼錯。 [本頁](http://goessner.net/articles/JsonPath/)列舉了一個很像你想要的例子:'$ .. book [?(@。price <10)] \t'「過濾所有書籍便宜比10「 –

+0

謝謝,我得到它的工作$ .prefixes [?(@。區域==」ap-southeast-2「)]。ip_prefix – user728584

回答

1

從博客帖子樣品指導固定它...

$.prefixes[?(@.region=="ap-southeast-2")].ip_prefix