Please help with SyntaxError: JSON.parse in storage integration

@neoaggelos, to actually answer the question for @Petr:

Once you get the response, in Javascript you need:

response = '{"data": [' + response.replace(/\n\n/gm, ',').slice(0, -1) + ']}';

If you do Python for an application or service it is:

theJSON = "{\"data\": [" + r.text.replace("\n\n", ",")[:-1] + "]}";

The docs are good if you are really old (like me) & can see “The Matrix”. I get the whole Event Stream idea but as it does not have any CORS options in the browser it’s a b1tch to use and the gaps between results are catching people out with other code.