bhylu.com

Advertisements

JSON Values

JSON supports objects, arrays, strings, numbers, booleans, and null. It has no built-in Date or BigInt value type.

Where to run this

This example uses the JavaScript console playground. Select Run to execute it; the example does not run on this lesson page.

A practical example

JavaScript

const data = JSON.parse('{"places":12,"tags":["repair"],"note":null}');
console.log(data.tags[0], data.note);

What happens

The tag is repair and the note is null.