skip to Main Content

Json – jq get values from complex object

I have an object that looks like this { "my_list": [ { "name": "an_image", "image": "an_image.com" }, { "name": "another_image", "image": "another_image.com" }, ...<more objects with image property> ], "foo": { "image": "foobar.io" }, "bar": { "image": "bar_image.io" }, ...<more…

VIEW QUESTION

having trouble converting csv to json using bash jq

I have one stream output stored in csv file, I need help converting csv to json: my csv looks like: cat output.csv "k","a1",1,"b1","c1","d1",1 "l","a2",2,"b2","c2","d2",2 "m","a3",3,"b3","c3","d3",3 "n","a4",4,"b4","c4","d4",4 "o","a5",5,"b5","c5","d5",5 Required output: note: I need key configuration to be added to json. {…

VIEW QUESTION

How to search/find specific word In JSON Array with java

I have a below JSON Array from the below, I want to get commandResponse associated with searched Command. e.g. lets say I searched command "show version", It should return my commandResponse as 16.0.1. JSON Array [{"commandResponse":"","errorMessage":"harddisk crash not applicable.","name":"harddiskcrash","command":"harddiskcrash","status":"NotApplicable"},{"commandResponse":"","errorMessage":"stby-harddisk crash…

VIEW QUESTION
Back To Top
Search