Top "Jq" questions

jq is a sed-like tool for JSON data – you can use it to slice, filter, map, and transform structured data with the same ease that sed, awk, grep and friends lets you play with text.

Flatten a JSON document using jq

I'm considering the following array of JSON objects: [ { "index": "index1", "type": "type1", "id": "id1", "fields": { "deviceOs": [ "Android" ], "deviceID": [ "deviceID1" ], "type": [ "…

json jq
GitLab CI syntax to write FOR loop statement?

Below is the script mentioned in the gitlab-ci.yml file. This GitLab CI configuration is valid. But, when the CI/…

gitlab yaml jq gitlab-ci jfrog-cli
jq select value from array

I have the following JSON file with example values: { "files": [{ "fileName": "FOO", "md5": "blablabla" }, { "fileName": "BAR", "md5": "alaldlafj" }] } Now what …

json jq
Converting CSV to JSON in bash

Trying to convert a CSV file into a JSON Here is two sample lines : -21.3214077;55.4851413;Ruizia cordata -21.3213078;55.4849803;Cossinia pinnata …

json bash csv unix jq
converting lines to json in bash

I would like to convert a list into JSON array. I'm looking at jq for this but the examples are …

bash jq
How to convert a JSON object to key=value format in jq?

In jq, how can I convert a JSON to a string with key=value? From: { "var": 1, "foo": "bar", "x": "test" } …

json bash jq
get label value from docker inspect

I had problem to get the value from the map list due to the key has "." inside. docker inspect jenkins ... …

docker docker-compose jq
jq - How to filter a json that does not contain

I have an aws query that I want to filter in jq. I want to filter all the imageTags that …

json jq
How to remove an array element with jq?

I'm trying to figure out how to remove an array element from some JSON using jq. Below is the input …

json jq
Pattern matching field names with jq

This is a very basic (probably silly) question but I can't get it to work... I have a JSON file …

json regex key match jq