What is the best way to see the result returned by a function? E.g. a function does an API call and returns a json result.
I tried to output the results to Notes. The result looks like a json output but when I parse it using a json tool, it doesn't like the format.
Below are the two addNote output scripts I tried. I am open to other ideas that can help visualize the result from a function.
Output script 1:
import json
results = playbook.functions.results.rest_response
incident.addNote("ipinfo.\n{}".format(results.get("content", {})))
Output script 2:
import json
results = playbook.functions.results.rest_response
data = json.dumps(results)
incident.addNote(str(results))
Noe: The intend to view the result is to figure out how to pull specific fields and values needed from the json dictionary.
------------------------------
Ray Tam
------------------------------