https://github.com/pschmitt/plib.jq
pschmitt's jq stdlib
https://github.com/pschmitt/plib.jq
jq jq-module json
Last synced: about 1 month ago
JSON representation
pschmitt's jq stdlib
- Host: GitHub
- URL: https://github.com/pschmitt/plib.jq
- Owner: pschmitt
- License: gpl-3.0
- Created: 2024-05-15T05:45:44.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2026-05-26T09:36:52.000Z (about 2 months ago)
- Last Synced: 2026-05-26T11:29:27.974Z (about 2 months ago)
- Topics: jq, jq-module, json
- Language: jq
- Homepage:
- Size: 82 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 💒 plib.jq
This [jq module](https://jqlang.github.io/jq/manual/#modules) includes a set of
functions that are useful, to me, @pschmitt and maybe to you.
## 🔨 Installation
Grab [./plib.jq](./plib.jq) and put it in jq's
[include path](https://jqlang.github.io/jq/manual/#modules).
## 🍧 Usage
```shell
kubectl get nodes -o json | jq -er -L "$PWD/plib.jq" \
--argjson cols '[".metadata.name", ".metadata.labels"]' '
import "plib" as p;
.items[] | p::getallpaths()
'
# Output
# {
# "metadata.name": "mynode-001",
# "metadata.labels": {
# "beta.kubernetes.io/arch": "amd64",
# "beta.kubernetes.io/os": "linux",
# "kubernetes.io/arch": "amd64",
# "kubernetes.io/hostname": "mynode-001",
# "kubernetes.io/os": "linux"
# }
# }
```