Creator Help

tomap

This topic describes the syntax and usage of the toMap() function in Zoho Creator.

Description

The toMap() function returns the Map from a given JSON formatted String expression.

Syntax

<String>.toMap()

Example

Following is an example where the toMap() function is used. The function returns the Map from the specified JSON formatted String expression. The returned Map can then be used to perform various map functions. You can add the following code in the required form actions block.

Product= "{Type: Phone, Brand: Apple, Color: Black}";
Product_Map= Product.toMap();

where,
"{Product: Phone, Brand: Apple, Color: Black}" is the json format string expression,
tomap() converts the JSON formatted string expression to Map,
Product_Map holds the newly created map structure.

Top