Skip to content

[Bug] 0 is not equal to 0.0 #227

@AkiraVoid

Description

@AkiraVoid

JSON Example

[
    {"keyword": "A", "meta": {"hits": {"__PASS__": 0.0, "tag_1": 1}}},
    {
        "keyword": "B",
        "meta": {"hits": {"__PASS__": 0.6, "tag_xx": 0.2, "tag_xxx": 0.2}},
    },
    {"keyword": "C", "meta": {"hits": {"__PASS__": 0}}},
]

Reproduce

  • Use example above
  • Try JSON Path $[?(@.meta.hits['__PASS__'] = 0.0)].keyword, produces ['A', 'C']
  • Try JSON Path $[?(@.meta.hits['__PASS__'] = 0)].keyword, produces ['A', 'B', 'C']

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