When you have a string JSON, for example in scenarios where the server returns JSON as strings, you can make use of this function to convert the string to a JSON. You need to pass the string Json to the function which then converts it into a JSON array or object.
Syntax :
STRINGTOJSON(string JSON)
Where,
- String JSON : is a valid JSON of type String
The function will parse the JSON column data of a single row only.
Example
STRINGTOJSON(LOOKUP([sheet.jsonColumn],sheet.unique_id=12))
This will result into the LOOKUP fetching the String column from the Sheet where the Unique Id is 12 and returning it as a JSON.
This being a conversion function you would typically be using the function to convert data and add it to a JSON control or a JSON column in a sheet or just simply extract a value of a particular key from a JSON object.
To further understand how to use the STRINGTOJSON Function, refer to this article here.