15
Use JMESPath instead of or in addition to JSONPath (JSONPath sucks.)
Source: Kong/insomnia#4883 · opened by @AaronBeaudoin
Strong opinion incoming, brace yourself: JSONPath sucks. Maybe it's just because my use case is weird (I don't think so). But I think there's good reason that the [AWS CLI uses JMESPath]( and not JSONPath. The main thing about JSONPath that drives me insane is that there's no way to pick multiple properties from a list of objects. Here's a minimal example. The Data The Desired Output JMESPath Way Dang, that was easy. As it should be! JMESPath calls the syntax for doing this a [MultiSelect Hash]( And it's part of a specification, unlike JSONPath. JSONPath Way Just kidding, there is no way. The closest you can get (as far as I'm aware) is this: And the output you get is this: Good enough? In my opinion, no. What I'm wanting is pretty basic, I just want to output part of an object. How hard should it be? I'm often getting huge JSON data back from my API requests and just want to trim it down to a…
No pledges yet. Be the first to back this.
Comments
Similar requests
JSONPath/XPath access to Environment Variables
1 vote · 0 comments
Turn on / off the JSONPath expression
4 votes · 0 comments
Active JSONPath filter not obvious
2 votes · 0 comments
Enable variables in response filter and ability to use JQ as an option
1 vote · 0 comments
Autocomplete to jsonpath in preview window
1 vote · 0 comments
No comments yet.