Parses a JSON string into a JSON.
- Source:
-
core.js, line 1467
Parameters:
Name |
Type |
Description |
string
|
Any
|
Some string to parse. |
Returns:
A JSON-like object.
-
Type
-
object
Examples
Example 1.
stringToJSON('{"a": 1}'); // returns {a: 1}.
Example 2.
stringToJSON(1); // returns {}.