fx JSON viewer and processor
Light · Postcard
102 × 152 mm · PDF
Dark · Postcard
102 × 152 mm · PDF
Ink saver · Postcard
102 × 152 mm · PDF
Light · A4 landscape
297 × 210 mm · PDF
Dark · A4 landscape
297 × 210 mm · PDF
Ink saver · A4 landscape
297 × 210 mm · PDF
Light · A3 landscape
420 × 297 mm · PDF
Dark · A3 landscape
420 × 297 mm · PDF
Ink saver · A3 landscape
420 × 297 mm · PDF
Start here
fx <file>curl <url> | fx
fx <file> .<key>
fx <file> '.items.map(x => x.id)'
fx <file> .
fx <file> .items @.name
fx <file> .items '?.active'
fx --yaml <file>
Concepts
- Input file or stdin
- Arg 1 .users
- Arg 2 @.name
- Output JSON or text
Run and input
fx <file><cmd> | fx
fx <file> <expr>
<cmd> | fx .
fx <file> <expr1> <expr2>
curl -i <url> | fx
fx --slurp <expr>
fx --strict .fx --versionfx --comp bashExpressions
.<key>.<key>[0].<key>[]x => x.<key>
'.map(x => x.<key>)'
'.filter(x => x.<key> > 1)'
@.<key>?.<key>'({...x, <key>: 1})'
'Object.keys'
'`Hi ${x}`'
'x.<key> = 1, x'
'x.id = 12345678901234567890n'
Built-in functions
lenkeys / valuessort / sortBy(fn)
uniqgroupBy(fn)map(fn) / filter(fn)
flattenreversechunk(<n>)
walk(fn)listsavetoBase64 / fromBase64
YAML.stringifyYAML.parseFormats
--yaml--toml--xml--html--edn / --maml--raw / -r-rsInteractive: move
:<n>Interactive: fold and view
Interactive: search and output
/<re>//<re>/i:w <file>:w !<cmd>:wqRecipes
curl -s <url> | fx .items @.name list
fx config.yaml . > config.jsonkubectl get pod -o yaml | fx --yaml .spec
fx <file> 'x.name = x.name.toUpperCase(), x' save
curl -s <url> | fx > part.json# move to a value, press P



