Skip to content

Can nested JSON string parsing be supported? #91

Open
@litao09h

Description

@litao09h

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"]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions