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
[
{
"name": "foo",
"age": 123
},
{
"name": "bar",
"age": 456
}
]
and the root selector .[]
will produce the following output
age | name |
---|---|
123 | foo |
456 | bar |
Manipulating nested JSON object
{
"meta": {
"hello": "world"
},
"data": [
{
"name": "foo",
"age": 123
},
{
"name": "bar",
"age": 456
}
]
}
and the root selector .data[]
will produce the following output
age | name |
---|---|
123 | foo |
456 | bar |
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