I have a JSON document as a result of scanning a DVD. It contains a TitleList array, each entry of which contains a ChapterList array, each entry of which has a Duration object. I want to select a ...
Consider the following code snippet based on libjq.#include <stdio.h>#include <stdlib.h>#include <jq.h>#include <jv.h>int main(void) { jq_state *jq = jq_init(); ...
I have a list of hostnames and I want to filter out all hostnames that end in any of a given list of domains.For example for the hostnames["host1.exmaple.org", "host2.example.org"...
I have a task to convert a JSON file to a CSV with a header at the top. The header has to be in a particular order. So the order of the keys in the JSON file will be in different order than the ...
I am working on creating an adaptive card dynamically. I have the skeleton on the card in JSON and I want to add entries to it (each entry will be a JSON object inside the "body" of the ...
I am hoping I can get an answer on this question. I am using ./jq to convert a CSV file into a file of JSON objects. Each line of the CSV input represents a JSON object. A sample of the CSV input is ...
When using this algorithm:jq -s 'def deepmerge(a;b): reduce b[] as $item (a; reduce ($item | keys_unsorted[]) as $key (.; $item[$key] as $val | ($val | ...
I like using :!pbpaste | jq to see my JSON objects when reading logs in vim.But it often throws the following error with the slightest inconvenience in the JSON body.jq: parse error: Invalid numeric ...
I'm trying to determine whether a jq expression refers to no items at all, without collapsing null and empty.As I understand it, .foo? should be identical to try .foo catch empty. Because catch empty ...
Imagine the following data (array of users which can have many roles, each user object has multiple roleIDs referenced and an array of role definitions):{ "users": [ { "id&...