Another way to approach this, hope this helps:
<?php
$api = 'http://41.192.149.206:8080/query?select=[time.iso,ch1.d2,ch1.amps.d2,ch1.va.d2,ch1.pf.d2]&begin=h-30m&end=h&group=30m&format=json&header=yes';
$out = file_get_contents($api);
echo $out;
Then:
php nr-test.php
Yielding this mess (the problem):
0086
{"range":[1583087400,1583089200],"labels":["Time","ch1","ch1","ch1","ch1"],
"data":[["2020-03-01T20:30:00",531.63,2.32,542.09,0.98]]}
0000
Clearly showing the problem (above).
Then (just a quick kludge), do this:
<?php
$api = 'http://41.192.149.206:8080/query?select=[time.iso,ch1.d2,ch1.amps.d2,ch1.va.d2,ch1.pf.d2]&begin=h-30m&end=h&group=30m&format=json&header=yes';
//$out = file_get_contents($api);
$stuff = file($api);
$out = $stuff[1].$stuff[2];
echo $out;
Which I did (to give you some ideas), and moved to the web and put this test endpoint in an HTTP REQUEST node, like this:
Giving the desired result.
A total kludge.. LOL. But it helps reveal the problem and potential solutions and work arounds
In other words, one approach is to use an intermediary process to "clean up the mess" before processing.