search
to work in the opposite way? I mean, instead to search
a key:value, to exclude the key:value passed and return all the rest
{"peers": {"ns1.sys.cloudsys.tmcs": {"delay": [ 0.476, 0.371 ]}, "insert": { "10.75.33.5": { "delay": [ 0.384 ]}}, "delete": {"ns2.sys.cloudsys.tmcs": { "delay": [ 0.465 ]}}}
insert
and delete
, is it possible to do with wildcards? kind of peer.[insert|delete]
?
interfaceStatus
I can do interfaces.*.interfaceStatus
and I get the right result, however I lose Ethernet47
so I am not sure to which interface the interfaceStatus
belongs to"Ethernet48": {
"lastStatusChangeTimestamp": [
1580496491.6286151,
1580496491.6286182
]
},
"Ethernet47": {
"lastStatusChangeTimestamp": [
1580496491.629291,
1582706128.6775026
],
"interfaceStatus": [
"connected",
"disabled"
]
}
.*.
and get back the value of * where jmspath match
There is an official repo (the web site / test suite ones), but I'm not the maintainer (who hasn't responded to some issues for several years), so I don't know who should take responsibility.
FWIW, I've forked the official documentation site (so I can host it with TLS) and the JS implementation for GorillaStack, and I'm maintaining my own specification additions in the doc site and the JS implementation.
See:
https://github.com/gorillastack/jmespath.js
https://github.com/gorillastack/jmespath.site
locations[].{ x: name+'x' }
locations[].{ x: name+state }
?
locations[].{ x: 'prefix ${name} sufix' }
?