json
Parses the string and returns a JSON object.
json
Parses the string and returns a JSON object.
Type: transform
Aliases
toJson
, parseJson
Parameters
- input (string): The JSON string to parse.
Returns
Type: any
The parsed JSON object or value.
Examples
toJson('{"key": "value"}') // { key: "value" }
'{"name": "John", "age": 30}'|toJson // { name: "John", age: 30 }