My JSON output looks like this;
{
"1":{
"state":{
"on":false,
"bri":124,
"hue":14985,
"sat":252,
"effect":"none",
"xy":[
0.5182,
0.4363
],
"ct":480,
"alert":"none",
"colormode":"xy",
"reachable":true
},
"type":"Extended color light",
"name":"Slaapkamer rechts",
"modelid":"LCT001",
"manufacturername":"Philips",
"uniqueid":"00:17:88:01:00:dc:36:68-0b",
"swversion":"66013187"
},
"2":{
"state":{
"on":false,
"bri":125,
"hue":14984,
"sat":252,
"effect":"none",
"xy":[
0.5182,
0.4363
],
"ct":480,
"alert":"none",
"colormode":"xy",
"reachable":true
},
"type":"Extended color light",
"name":"Slaapkamer links",
"modelid":"LCT001",
"manufacturername":"Philips",
"uniqueid":"00:17:88:01:00:dc:33:99-0b",
"swversion":"66013187"
}
}
Does anyone know a easy way to make this output grep-able? Or any other way to put the output on one line so I can use tools like grep, awk etc on the json output? If I do a grep right now on the word 'hue' then I get 2 lines;
"hue":14985,
"hue":14984,
While I sometimes only want to grep on the first or the 2nd one..
Any ideas?