DrSchool Learn coding, fast.
EN AR BN CS DE EL Search

JSON Parse — Example 145

Quick explanation + ready code for: JSON Parse.

Small Basic JSON Parse Back to examples
Back to language
Syntax: JSON Parse in Small Basic. ID: #145

Code

const obj = JSON.parse('{"a":23,"b":24}');
console.log(obj.a + obj.b);

Notes

You can copy this snippet and adapt it. For advanced, add real-world inputs, edge cases, and tests.