Skip to content
This repository was archived by the owner on Oct 14, 2020. It is now read-only.
This repository was archived by the owner on Oct 14, 2020. It is now read-only.

Issue filtering with @ #49

@lookitsjonno

Description

@lookitsjonno

Apologies in advance, I'm new to JSONPath.

I do not understand why I am not able to filter based on keys, but a wildcard works. For example:

$content = [
    'body' => [
        'order' => [
            'id' => 2
        ]
    ]
];
// doesn't find the element
var_dump((new JSONPath($content))->find('$.body.order[?(@.id == "2")]'));
// finds the element
var_dump((new JSONPath($content))->find('$..[?(@.id == "2")]'));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions