json-path-expression Questions

2

I am trying to get the departments id where location is USA in the following JSON { "datapoints": [{ "id": "default.1", "definedBy": "default/0.1&quo...
Aubade asked 11/7, 2023 at 0:48

11

Solved

Is there a way to define a XPath type query for nested python dictionaries. Something like this: foo = { 'spam':'eggs', 'morefoo': { 'bar':'soap', 'morebar': {'bacon' : 'foobar'} } } print...
Fleawort asked 6/9, 2011 at 13:1

1

Solved

When trying to change a single element in an array, I get Invalid path expression near attempt to access element - but only when the array is captured from --rawInput. Example: # input: [ 1, 0 ] ...
Horizontal asked 13/12, 2019 at 14:37

2

Have a service that returns a very basic json respons: { "methodresult": "error", "ErrorCode": 2, "ErrorCodeText": "format", "ErrorMessage": "Json parse exception at pos:171 msg:Expecting \"ke...
Darfur asked 25/10, 2018 at 16:28

2

Solved

Is it possible to use a relative path or name in JQ like the XPath // ? Or is it possible to use an wildcard in JQ like .level1.*.level3.element ?
Seamaid asked 11/9, 2014 at 6:44
1

© 2022 - 2024 — McMap. All rights reserved.