I am trying to read each cell of CSV and treat it as an input for the JQ command. Below is my code: line.csv | Line | |:---- | | 11 | | 22 | | 33 | Cod
I need to replace part of a value from a json output. I could easily do this using sed -i however it would also replace other parts of the file I don't want it
I want to convert JSON string into an array in bash. The JSON string is passed to the bash script as an argument (it doesn't exist in a file). Is there a way o
I want to convert JSON string into an array in bash. The JSON string is passed to the bash script as an argument (it doesn't exist in a file). Is there a way o
Assuming I have the following JSON object (which is just an example): { "foo": 1, "bar": 2, "baz": 3 } And the following JSON array (another example)
I return a few json values from an API feed using this command: curl -s -u user:pass -H 'my header' https://example.com/data.json | jq -cr '.[] | {id: .id, con
I have json data that looks like [ { "session": "ffe887f3f150", "src_ip": "81.71.87.156" }, { "session": "fff42102e329", "src_ip": "143.19
I can create a json object with an array using jq like this echo '{"input":{"names":[]}}' | jq --arg val "alice" '.input.names[0] += $val'| jq --arg val "bob"
I have a json file I am parsing with jq. This is a sample of the file [{ "key1":{...}, "key2":{...} }] [{ "key1":{...}, "key2":{...} }] ... each line is a list
How to construct a name of a variable from data and access that variable? For example it should somehow give the content of the alpha-file: jq '$.var"-file"' --
I read data from a json file with jq. I wanna append the results into a yaml file, but I dont get it working. I am quite new to shell programming. My goal is to
I am running a curl rest-api call and try to extra some key/value pairs in UBUNTU. This is my current command: curl ..... | jq -c '{"online": .switches.option
I need to know the most efficient way of installing JQ on Mac (El Capitan). The code is downloaded to my Mac but I would like to know how I can install and oper
I have a json file that needs to be updated on a certain condition. Sample json { "Actions" : [ { "value" : "1", "properties" : {
If I have a JSON like this, { "hello1": "world1", "testk": "testv" } And I want to export each of these key-value pairs as environment variables, how t
If I have a JSON like this, { "hello1": "world1", "testk": "testv" } And I want to export each of these key-value pairs as environment variables, how t
I have this JSON: {"item":2, "url":"domain/house/23/bedroom"} I'm trying to use jq to obtain this new JSON: {"item":2, "number":"23", "room":"bedroom"} Is it
Here Edit yaml objects in array with yq. Speed up Terminalizer's terminal cast (record) I asked about how to edit yaml with yq. I received the best answer. But
How can I extract all key names, even in nested objects with jq? For example, I have json: { "a": 1, "b": { "c": 2 } } and I want to get list:
I am trying to write a shell script that can read a json string, decode it to an array and foreach through the array and use the key/value for replacing strings