The Deserializer
Easy+15 XP
Mission Briefing
We've intercepted a transmission from the enemy base! It's currently an unreadable string format. You must deserialize it back into a usable object so we can read their secrets!
The Concept: JSON Mastery
The JSON.parse() method does the exact opposite of stringify. It parses a JSON string, deeply reconstructing the JavaScript value or object described by the string.
Example: JSON.parse('{"a":1}'); // Returns { a: 1 }
The Objective
Your function receives a JSON string jsonStr.
- Convert the string back into a JavaScript object using
JSON.parse(). - Return the reconstructed object.
01EXAMPLE 1
Input
jsonStr = '{"id":1}'Output
{ id: 1 }Constraints
- Use JSON.parse().
CoreJSON
JavaScriptSystem handles I/O — write your function only
Loading...
3 Hidden
Input Arguments
jsonStr"{\"id\":1}"
Expected Output
{"id":1}Click RUN to test your solution