userland.run70Try the demo
Catalog app · RISC-V VM

Run jaq in the browser

Query and transform JSON with jq syntax, with a focus on correctness and speed.

Try it live

Nothing is downloaded until you press Run.

catalog app

Select fields with a jq filter

Installs jaq 3.1.0 from the signed catalog (every chunk is verified before it is written), then runs the commands below in the VM's shell.

bash
jaq --version
jaq -c '{name, tags}' package.json
loading…
Expected output
$ jaq --version
jaq 3.1.0
$ jaq -c '{name, tags}' package.json
{"name":"nano-demo","tags":["vm","wasm"]}

What it is

jaq implements the jq language: filters, pipes, map, select, object construction and more. It aims to fix jq's corner-case behaviours and to start and run faster. In the browser it powers JSON transformations over data held in the VM without a backend.

Package facts

version
3.1.0
runs on
RISC-V VM (elf-app, riscv64gc-linux-musl)
download
1.9 MB compressed · 1 file
command
jaq
requires
nothing else — a static binary
license
MIT (upstream)
upstream
github.com/01mf02/jaq
categories
Data, Text
catalog
generation 12, Ed25519-signed

Install and run it from your page

With the SDK, installApp resolves jaq in the signed index, fetches its content-addressed chunks from the CDN, verifies each one and writes the files into the VM. Details in Installing catalog apps.

javascript
import { createNano } from "@userland-run/nano-sdk";

const nano = await createNano({ image: { wasm: "/nano/console.wasm" }, ramMB: 512 });
await nano.installApp("jaq"); // signature-verified, cached in OPFS

const r = await nano.shExec("jaq --version");
console.log(r.stdout);

Typical usage of the upstream command-line tool:

bash
jaq '.items[] | select(.active) | .name' data.json

← All 32 catalog apps