Skip to content

Filter Expression With Equals #45

@SoftCreatR

Description

@SoftCreatR

Test Data:

[
   {
      "key":0
   },
   {
      "key":42
   },
   {
      "key":-1
   },
   {
      "key":1
   },
   {
      "key":41
   },
   {
      "key":43
   },
   {
      "key":42.0001
   },
   {
      "key":41.9999
   },
   {
      "key":100
   },
   {
      "key":"some"
   },
   {
      "key":"42"
   },
   {
      "key":null
   },
   {
      "key":420
   },
   {
      "key":""
   },
   {
      "key":{
         
      }
   },
   {
      "key":[
         
      ]
   },
   {
      "key":[
         42
      ]
   },
   {
      "key":{
         "key":42
      }
   },
   {
      "key":{
         "some":42
      }
   },
   {
      "some":"value"
   }
]

Selector:

$[?(@.key==42)]

Result (Proposal A):

--- Expected
+++ Actual
@@ @@
-'[{"key":42}]'
+'[{"key":42},{"key":"42"}]'

https://cburgmer.github.io/json-path-comparison/results/filter_expression_with_equals.html

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions