Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter + Multiselect and array key access #90

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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