toMap

toMap

Overview

The toMap function takes a JSON formatted text as an argument, and returns a key-value pair.

Return Type

  • KEY-VALUE

Syntax

<variable>=<json_text>.toMap();

where,

ParameterData typeDescription
<variable>KEY-VALUEThe variable which will contain the converted key-value pairs.
<json_text>TEXTThe JSON formatted text that needs to be converted to key-value pairs.

Note:

  • If the text is not in JSON format, a runtime error will be thrown.

Examples

 products = "{company:Zoho, product:Creator}";
 info products.toMap(); // Returns the key-value pair {"product":"Creator","company":"Zoho"}

Share this post : FacebookTwitter

Still can't find what you're looking for?

Write to us: support@zohodeluge.com