Loading problem…
Implement a simplified version of JSON.parse that converts JSON strings back to JavaScript values.
Given a JSON string, parse it and return the corresponding JavaScript value. Your implementation should handle:
parse('42'); // 42
parse('"hello"'); // "hello"
parse('true'); // true
parse('null'); // null
parse('[1,2,3]'); // [1, 2, 3]
parse('{"a":1,"b":2}'); // {a: 1, b: 2}This problem models real JSON parsing: