Json Parsing

Learning from AstroPlatformer

Code Runner Challenge

json-parsing

View IPYNB Source
%%js
// CODE_RUNNER: json-parsing

const obj = {name:"Level1", width:650};
const json = JSON.stringify(obj);
console.log("JSON:", json);
const parsed = JSON.parse(json);
console.log("Parsed:", parsed.name);

Lines: 1 Characters: 0
Output
Click "Run" in code control panel to see output ...