Skip to content

Issues with Filtering with an Array of Strings #20

@ArgentEnergy

Description

@ArgentEnergy

I have an object that looks something like

{"tags": ["web", "owasp:software_and_data_integrity_failures"]}

CyberChef JPath expression works with $.tags[?(@ == 'web')] but when I try it with the library it fails to return web.

>>> data = {"tags":["web","test2"]}
>>> jp = JSONPath("$.tags[?(@ == 'web')]")
>>> jp.parse(data)
[]

The goal is to have $.tags[?(@ =~ /owasp:.+/)] return owasp:* from the array. It looks like the library only supports filtering on arrays with objects.

I'm on the latest release 1.1.4.

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