Created
September 15, 2015 15:38
-
-
Save chelnak/458f8816cf7092cf9a6e to your computer and use it in GitHub Desktop.
parseResponse.js action used in OTS package
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Input: string - Response in a JSON string | |
| //Output: Any - Return the parsed object | |
| //Parse the json string | |
| var jsonResponse = JSON.parse(response); | |
| //loop through and print out each key and value | |
| for(var i in jsonResponse) { | |
| System.log(i + ": " + jsonResponse[i]); | |
| } | |
| //return the object | |
| return jsonResponse; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment