What is JSON?
- string: a string that contains data in JSON format
- function (optional): a function that converts the parsed value before returning it from the method. The function will be called for each element while parsing the string
How to convert values when parsing JSON?
JSON.parse() can take a function as its second parameter. A function can convert object values before they are returned.