#How to store complex JSON content in a variable

1 messages · Page 1 of 1 (latest)

tidal pewter
#

Can someone please give an example of how to do this with the result of an http request?

"If you really need to save a complex content into a variable, for example an object, you can use the JSON.stringify function to convert it into a text. And whenever you are using the variable, you can dynamically parse it back into an object using JSON.parse in an inline format:"

For example, I'm calling a GET from an API, which returns a JSON block of data. I would like to store all of it in a variable, so I can work with it - probably through a script block - and pull out the data I want. I'm not sure how to store the data in the variable correctly. When I try to save some portion of the data to a variable, and then return the variable, it comes back as undefined.

timid zodiac
#

This post has been pushed to the community knowledgebase. Any replies in this thread will be synced to the community site.