This commit is contained in:
Philippe Torrel
2026-09-28 09:42:41 +02:00
parent 8a2d979830
commit 80296c10d0
6 changed files with 89 additions and 16 deletions
@@ -41,9 +41,11 @@ F. Scott Fitzgerald
};
// JSON String
const jsonString = JSON.stringify(book, null, 2);
console.log(jsonString);
// JS Object
const bookObj = JSON.parse(jsonString);
console.log(bookObj.title); // => 'The Great Gatsby'
console.log(bookObj.author); // => 'F. Scott Fitzgerald'
</script>