I have a rails app which gets a response from World Weather Online API. I\'m using the rest-client gem and the response is in JSON format.
I parse the response using
You may want to look at JSONPath. It does exactly what you need. Its syntax is very similar to XPath, but JSONPath works with JSON data (as obvious).
There is a Ruby implementation: https://github.com/joshbuddy/jsonpath
I personally use it in every project where I need to test JSON responses.