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

Can nested JSON string parsing be supported? #91

Open
litao09h opened this issue Jan 2, 2024 · 0 comments · May be fixed by #93
Open

Can nested JSON string parsing be supported? #91

litao09h opened this issue Jan 2, 2024 · 0 comments · May be fixed by #93

Comments

@litao09h
Copy link

litao09h commented Jan 2, 2024

Can nested JSON string parsing be supported?
example:

var data = `{
    "name": "John",
    "nested_json": "{\"age\": 25, \"city\": \"New York\"}"
}`

expression = jmespath.compile('nested_json | from_json_string(@).[age,city]')
// from_json_string(nested_json).[age,city]

var result = expression.search(data)

output:
["25","New York"]

@joerodriguez joerodriguez linked a pull request Jan 18, 2024 that will close this 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 a pull request may close this issue.

1 participant