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

It can not work if i use array index after ?(@ expression #1006

Open
chenliuyang1989 opened this issue Mar 29, 2024 · 1 comment
Open

It can not work if i use array index after ?(@ expression #1006

chenliuyang1989 opened this issue Mar 29, 2024 · 1 comment

Comments

@chenliuyang1989
Copy link

it can not work if i use array index after ?(@ expression , it only rerurn []

image

  • This is json which what to parse
    {"gatewayId":"mqtt.c1209830320910331904","msgType":"report","namespace":"10000210","payload":[{"data":{"0.12.85":5520},"did":"mqtt.c1209830336887947264","time":1711713042852}],"random":"123","seq":41782,"timeStamp":1711713042852}

  • This is the query
    $['payload'][?(@.did == 'mqtt.c1209830336887947264')].[0]['data']['0.12.85']

@chenliuyang1989
Copy link
Author

chenliuyang1989 commented Mar 29, 2024

This is one test project to reproduce the error:
(https://github.com/chenliuyang1989/JSONPath)

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

No branches or pull requests

1 participant