Forrest logo
back to context overview

jq

List of commands for jq:

  • jq:ai:411dc how do handle json data
    $ jq
    try on your machine
    explain this command
  • jq:tldr:1e0d2 jq: Print specific keys.
    $ ${cat filename-json} | jq '${-key1, -key2, ---}'
    try on your machine
    explain this command
  • jq:tldr:52adf jq: Print all array items/object keys.
    $ ${cat filename-json} | jq '.[]'
    try on your machine
    explain this command
  • jq:tldr:7cf6c jq: Execute a specific expression (print a colored and formatted json).
    $ ${cat filename-json} | jq '.'
    try on your machine
    explain this command
  • jq:tldr:a69c2 jq: Add/remove specific keys.
    $ ${cat filename-json} | jq '. ${select} ${{"key1": "value1", "key2": "value2", ---}}'
    try on your machine
    explain this command
  • jq:tldr:b446f jq: Execute a specific script.
    $ ${cat filename-json} | jq --from-file ${path-to-script-jq}
    try on your machine
    explain this command
  • jq:tldr:c784c jq: Pass specific arguments.
    $ ${cat filename-json} | jq ${--arg "name1" "value1" --arg "name2" "value2" ---} '${- + $ARGS-named}'
    try on your machine
    explain this command
back to context overview