Get Free Trial

Get json report in string format

guest asked on December 22, 2016

How could I get the json report in string format? Before, to get the xml I could use: pivot.getReport(‘xmlString’). Thank you, I looked at the documentation and wasn’t able to find the answer.

1 answer

Dmytro Zvazhii Dmytro Zvazhii Flexmonster December 22, 2016

Thank you for your question. We can suggest you using the pivot.getRport(); API call which will return you the JSON object and then using JSON.stringify() which will turn the object into a string. You can combine it as following:
var reportString = JSON.stringify(pivot.getReport(), null, '\t');
Please let us know if it works for you.

Please login or Register to Submit Answer