Parsing JSON with JQ
Posted: Sunday 13 November 2016 16:04
Hello all, I'm busy with a script and I need to parse some json data.
I do also is on request on my smartmeter and it gives a nice output. From the data field I would like to split the value after the ";" can someone guide me in how to do that with jQ parser?
I now have .result[] ."Data"
It gives me "433777;877448;0;0;488"
But I only want the first value, so I need to cut it or split it after every ";".
But I can't seem to get it right in jqplay.org
Anyone who could help me with it?
I do also is on request on my smartmeter and it gives a nice output. From the data field I would like to split the value after the ";" can someone guide me in how to do that with jQ parser?
I now have .result[] ."Data"
It gives me "433777;877448;0;0;488"
But I only want the first value, so I need to cut it or split it after every ";".
But I can't seem to get it right in jqplay.org
Anyone who could help me with it?