JSONPath icon indicating copy to clipboard operation
JSONPath copied to clipboard

Filter Expression With Value

Open SoftCreatR opened this issue 5 years ago • 0 comments

Test Data:

[
   {
      "some":"some value"
   },
   {
      "key":true
   },
   {
      "key":false
   },
   {
      "key":null
   },
   {
      "key":"value"
   },
   {
      "key":""
   },
   {
      "key":0
   },
   {
      "key":1
   },
   {
      "key":-1
   },
   {
      "key":42
   },
   {
      "key":{
         
      }
   },
   {
      "key":[
         
      ]
   }
]

Selector:

$[?(@.key)]

Result (Proposal A):

--- Expected
+++ Actual
@@ @@
-'[{"key":true},{"key":false},{"key":null},{"key":"value"},{"key":""},{"key":0},{"key":1},{"key":-1},{"key":42},{"key":{}},{"key":[]}]'
+'[{"key":true},{"key":"value"},{"key":1},{"key":-1},{"key":42}]'

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

SoftCreatR avatar Nov 03 '20 14:11 SoftCreatR