JSON Query Playground

JSON Input

JQ Query

Result

jq Quick Reference

Basic Syntax

  • .The current object (identity)
  • .propertyAccess a property value
  • .[]Iterate over array elements
  • .[0]Access array element by index

Filters

  • |Pipe output to next filter
  • select(condition)Filter objects based on condition
  • map(expression)Transform each element of an array
  • lengthGet the length of an array or string

Advanced

  • {field: value}Create a new object
  • if-then-elseConditional logic
  • addSum array elements
  • keysGet object keys as an array