Sign inSign up

pluggedout/jq-alpine

By pluggedout

•Updated almost 2 years ago

Convenience docker image bringing the might of jq to Powershell.

Image
Integration & delivery
Developer tools
0

1.8K

pluggedout/jq-alpine repository overview

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"] }'

Tag summary

Content type

Image

Digest

sha256:8c99cee69…

Size

3.9 MB

Last updated

almost 2 years ago

docker pull pluggedout/jq-alpine