0

I'm trying to run JSONPath on the below json file and extract all the IP Addresses (ip_prefix:) where the region equals "region: "ap-southeast-1""

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

My xpath skills are rusty, my JSONPath skills are novice!

2
  • 1
    Show what you have tried and we can tell you what you are doing wrong. This page lists an example a lot like what you want: $..book[?(@.price<10)] "filter all books cheaper than 10" Commented Jul 9, 2015 at 21:30
  • Thanks, I got it working $.prefixes[?(@.region=="ap-southeast-2")].ip_prefix Commented Jul 9, 2015 at 21:53

1 Answer 1

1

Fixed it with guidance from the blog post samples ...

$.prefixes[?(@.region=="ap-southeast-2")].ip_prefix
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.