Menu
Open source

JQ backend parser

JQ backend parser helps you to manipulate the data using JQ style syntax. You have to select JQ/jq-backend as the parser type in the query editor.

Setting the parser to JQ enables features such as Alerting, Shared Dashboards, SQL Expressions, Query Caching, Recorded Queries.

This parser is very similar to JSONata backend parser where you use JSONata style syntax in root selector. With JQ backend parser, you use jq style syntax in the root selector.

Examples

Manipulating simple JSON array

json
[
  {
    "name": "foo",
    "age": 123
  },
  {
    "name": "bar",
    "age": 456
  }
]

and the root selector .[] will produce the following output

agename
123foo
456bar

Manipulating nested JSON object

json
{
  "meta": {
    "hello": "world"
  },
  "data": [
    {
      "name": "foo",
      "age": 123
    },
    {
      "name": "bar",
      "age": 456
    }
  ]
}

and the root selector .data[] will produce the following output

agename
123foo
456bar

For more examples and to learn more about jq syntax, refer official jq documentation.

Computed fields

Computed fields option with JQ parser works similar to JSONata parser

Filter

Filter option with JQ parser works similar to JSONata parser

Summarize

Summarize option with JQ parser works similar to JSONata parser