DevToys icon indicating copy to clipboard operation
DevToys copied to clipboard

~ operator not supported in jsonpath tester

Open geirive opened this issue 6 months ago • 0 comments

Current behavior

Given input json

{
  "objects": {
    "default": {
      "key": "value"
    },
    "O1": {
      "key": "value"
    },
    "O2": {
      "key": "value"
    }
  }
}

jsonpath: $.objects.*~

result is [], where it should be expected (result in https://jsonpath.com/):

[
  "default",
  "O1",
  "O2"
]

How to reproduce it (as minimally and precisely as possible)

Open jsonpath tester and use the following values: JSON:

{
  "objects": {
    "default": {
      "key": "value"
    },
    "O1": {
      "key": "value"
    },
    "O2": {
      "key": "value"
    }
  }
}

JSONPath: $.objects.*~

and observe that result is []

Expected behavior

The expected result is from https://jsonpath.com/:

[
  "default",
  "O1",
  "O2"
]

Screenshots

No response

Workaround

use https://jsonpath.com/

Affected platforms

Windows

Affected DevToys kind

DevToys (app with GUI)

DevToys Version

Version 2.0-preview.5

Relevant Assets/Logs

No response

geirive avatar Aug 14 '24 12:08 geirive