JSONPath icon indicating copy to clipboard operation
JSONPath copied to clipboard

Filter Expression With Equals

Open SoftCreatR opened this issue 5 years ago • 0 comments

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

SoftCreatR avatar Nov 03 '20 14:11 SoftCreatR