parseJsonString
Modified on Wed, 02 Aug 2023
Description
Convert the JSON string value to an object
Syntax
parseJsonString(input)
Parameters
Input Parameter | Type | Description |
---|---|---|
input | string | JSON string |
Return value
Type |
---|
any |
Sample
Example | Result | Description |
---|---|---|
parseJsonString('1.25') | 1.25 | Parse JSON string for number |
parseJsonString('true') | true | Parse JSON string for boolean value |
parseJsonString('null') | null | Parse JSON string for null value |
parseJsonString('"abc"') | "abc" | Parse JSON string for string value |
parseJsonString('[1, 2, 3]') | [1, 2, 3] | Parse JSON string for list of numbers |
parseJsonString('["1", "2", "3"]') | ["1", "2", "3"] | Parse JSON string for list of string values |
parseJsonString('{"age":31,"name":"John"}') | {"age":31,"name":"John"} | Parse JSON string for a JSON object |
To view all the String functions, click here.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article