Convenience docker image bringing the might of jq to Powershell.
1.8K
Convenience docker image bringing the might of jq to Powershell.
Create a file: Invoke-Jq.ps1, and paste in this code:
function Invoke-Jq {
param (
[Parameter(Mandatory=$true)]
[string]$Filter,
[Parameter(Mandatory=$true)]
[string]$Json
)
# Run jq inside your custom Docker container
echo $Json | docker run --rm -i pluggedout/jq-alpine:latest $Filter
}
Now pull the image and dot-source in the file into powershell, like this:
docker pull pluggedout/jq-alpine:latest
. .\Invoke-Jq.ps1
You can now use the might of Jq in Powershell, even without WSL.
Invoke-Jq -Filter '.address | {city, zip}' -Json '{ "name": "Alice", "age": 30, "address": { "city": "Wonderland", "zip": "12345" }, "interests": ["reading", "gardening"] }'
Content type
Image
Digest
sha256:8c99cee69…
Size
3.9 MB
Last updated
almost 2 years ago
docker pull pluggedout/jq-alpine