Skip to content

How to use Extensions filter? #26

@ivanli1990

Description

@ivanli1990

There are some examples for Extensions filter. eg:

$.objects[?(some_field ~ “regexp”)]

But, I don't know how to use it in the code.

from jsonpath_rw_ext import match1
d = {'date': {'d': '2019'}}
res = match1('$.date[?(d ~ ".*")]', d)
print(res) # console None

In my test code above, the console is None. So, how to use Extensions filter? Could examples be written in more detail?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions