Skip to Content

SAC Scripting: Defining/Using JSON objects in functions


I was wondering how to work with JSON objects and how to pass them around in functions. I don't see Object as a data type for functions and variables. I know that in pure JS, JSON.parse() and JSON.stringify() are used to convert a string to a JSON and a JSON to String respectively. Therefore you can use a string as an input/return type and just parse the JSON object when you need to work with it. How can I achieve this in a function inside an Analytical Application. I tried looking up the API reference and this handbook without success. I need an object that will hold exchange rates w.r.t Euro like so: {"USD": "1.073", "CAD":"1.515"} and I would like to store this object in a variable (maybe as a string) and manipulate the parsed object.



Add a comment
10|10000 characters needed characters exceeded

Related questions

0 Answers

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.