Skip to content

Conversation

mvhirsch
Copy link

I'm using this in one of my projects, testing my JSON API. I really like it, thank you for providing such a cool library!

I'm trying to filter my array, asserting that a specific value is returned in first match.
According to website this works:

people[?age >= `30`].{name: name}[0].name
{
  "people": [
    {
      "age": 20,
      "other": "foo",
      "name": "Bob"
    },
    {
      "age": 25,
      "other": "bar",
      "name": "Fred"
    },
    {
      "age": 30,
      "other": "baz",
      "name": "George"
    }
  ]
}

image

I'm not sure if I correctly understood the test setup on this (feel free to correct me!), but it may help understanding my issue :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant