mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
Added jsonpath notes to the knowledge base
This commit is contained in:
16
knowledge base/jsonpath.md
Normal file
16
knowledge base/jsonpath.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# JSONPath
|
||||
|
||||
## TL;DR
|
||||
|
||||
```shell
|
||||
# filter elements
|
||||
# only works on arrays, not on maps
|
||||
kubectl get serviceaccounts \
|
||||
-o jsonpath="{.items[?(@.metadata.name!='default')].metadata.name}"
|
||||
```
|
||||
|
||||
## Further readings
|
||||
|
||||
- [JSONPath Syntax]
|
||||
|
||||
[jsonpath syntax]: https://support.smartbear.com/alertsite/docs/monitors/api/endpoint/jsonpath.html
|
||||
Reference in New Issue
Block a user