diff --git a/curriculum/challenges/english/25-front-end-development/lecture-working-with-objects/6732b788046862264eeb1c39.md b/curriculum/challenges/english/25-front-end-development/lecture-working-with-objects/6732b788046862264eeb1c39.md index 0cd417c1cf9..f89265aa175 100644 --- a/curriculum/challenges/english/25-front-end-development/lecture-working-with-objects/6732b788046862264eeb1c39.md +++ b/curriculum/challenges/english/25-front-end-development/lecture-working-with-objects/6732b788046862264eeb1c39.md @@ -1,17 +1,12 @@ --- id: 6732b788046862264eeb1c39 title: What Is JSON, and How Do You Access Values Using Bracket and Dot Notation? -challengeType: 11 -videoId: 8x6vJarVy_o +challengeType: 19 dashedName: what-is-json-and-how-do-you-access-values-using-bracket-and-dot-notation --- # --description-- -Watch the video or read the transcript and answer the questions below. - -# --transcript-- - What is JSON and how do you access values using bracket and dot notation? JSON stands for JavaScript Object Notation. It is a lightweight, text-based data format that is commonly used to exchange data between a server and a web application. @@ -38,7 +33,7 @@ As you can see, JSON uses key-value pairs to store information and each pair is To access data from a JSON object, you can either use dot or bracket notation. In this example, we are using dot notation to access the `age` from the JSON object: ```js -import data from "./example.json" assert { type: "json" }; +import data from "./example.json" with { type: "json" }; console.log(data.age); ``` @@ -48,7 +43,7 @@ This particular example is using what is known as an `import` statement, which i You can also use bracket notation to access information from JSON objects. Here is an example of accessing the `list of courses` array: ```js -import data from "./example.json" assert { type: "json" }; +import data from "./example.json" with { type: "json" }; console.log(data["list of courses"]); ```