I JSON.stringify a json object by
result = JSON.stringify(message, my_json, 2)
The 2 in the argument above is su
Consider your REST API returns:
{"Intent":{"Command":"search","SubIntent":null}}
Then you can do the following to print it in a nice format:
Output will de displayed here.
var ciResponseText = document.getElementById('ciResponseText');
var obj = JSON.parse(http.response);
ciResponseText.innerHTML = JSON.stringify(obj, undefined, 2);