query json in response
One of the things I am interested in helping is to put a json query language similar to jq into wuzz.
There is already an existing parser at https://github.com/tidwall/gjson.
Do you mean as an alternative method of searching (as opposed to the existing regex search)? If so, that sounds like a great idea - I'd definitely be interested in that. Not sure how else we could use a jq-like syntax in wuzz - I'd love to hear any suggestions you might have.
so if the response body is a json like say
{
"books": [
{ "id": "abc", "name": ... },
{ "id": "cde", "name": ...},
]
}
We should be able to query .books.[0] to get the first item or .books.[*].id to get all the id.
This will allow us navigate big json easily.
@ZwodahS agree, it would be useful. README's todo section already contains this feature but with xpath.
@ZwodahS that's what I thought you meant - that's a great suggestion.
alrighty, let me see what I can do =).