Skip to content

path $..*[?(@ === false)] does not work as expected #136

Closed
googlemaps/openapi-specification
#32
@vk342

Description

@vk342

given an object

{"a":{"b":false}}

I expect "$..*[?(@ === false)]" to return a result, in fact, this search returns empty array

As far as I can tell, the issue is on line 674:

JSONPath.prototype._eval = function (
    code, _v, _vname, path, parent, parentPropName
) {
    if (!this._obj || !_v) { return false; }

because _v === false the expression nether evaluated

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