← Node.js Foundations
3 / 25
Lesson 3 — JSON
The language APIs speak
JSON (JavaScript Object Notation) is a text format for data. Servers send and receive it all the time. JSON.parse(text) turns JSON text into a real object; JSON.stringify(obj) turns an object back into text.
const user = JSON.parse('{"name": "Alex"}');
user.name; // "Alex"
Why it matters: almost every request a Node server handles carries JSON.
Want it another way?
Task
Parse the JSON text and log the name and the age on two lines.
Run your code — when the output matches the task, you will see a green check. Then mark the lesson complete.
Test your knowledge
A quick 3-question quiz on this lesson — instant feedback.