Learn JSON files in 10 minutes! 📄

2024 ж. 27 Сәу.
25 165 Рет қаралды

#javascript #tutorial #json
// JSON = (JavaScript Object Notation) data-interchange format
// Used for exchanging data between a server and a web application
// JSON files {key:value} OR [value1, value2, value3]
// JSON.stringify() = converts a JS object to a JSON string.
// JSON.parse() = converts a JSON string to a JS object
00:00:00 introduction
00:00:36 create json files
00:03:24 json.stringify()
00:05:27 json.parse()
00:07:10 fetch()
00:09:30 conclusion

Пікірлер
  • // JSON = (JavaScript Object Notation) data-interchange format // Used for exchanging data between a server and a web application // JSON files {key:value} OR [value1, value2, value3] // JSON.stringify() = converts a JS object to a JSON string. // JSON.parse() = converts a JSON string to a JS object // ---------- JSON.stringify() ---------- const names = ["Spongebob", "Patrick", "Squidward", "Sandy"]; const person = { "name": "Spongebob", "age": 30, "isEmployed": true, "hobbies": ["Jellyfishing", "Karate", "Cooking"] }; const people = [{ "name": "Spongebob", "age": 30, "isEmployed": true }, { "name": "Patrick", "age": 34, "isEmployed": false }, { "name": "Squidward", "age": 50, "isEmployed": true }, { "name": "Sandy", "age": 27, "isEmployed": false }]; const jsonString = JSON.stringify(people); console.log(jsonString); // ---------- JSON.parse() ---------- const jsonNames = `["Spongebob", "Patrick", "Squidward", "Sandy"]`; const jsonPerson = `{"name": "Spongebob", "age": 30, "isEmployed": true, "hobbies": ["Jellyfishing", "Karate", "Cooking"]}`; const jsonPeople = `[{"name": "Spongebob","age": 30,"isEmployed": true}, {"name": "Patrick","age": 34,"isEmployed": false}, {"name": "Squidward","age": 50,"isEmployed": true}, {"name": "Sandy","age": 27,"isEmployed": false}]`; const parsedData = JSON.parse(jsonPeople); console.log(parsedData); // ---------- fetch() ---------- fetch("people.json") .then(response => response.json()) .then(values => values.forEach(value => console.log(value))) .catch(error => console.error(error));

    @BroCodez@BroCodez4 ай бұрын
  • even though i have watched so many JS tutorials i still watch bro's tutorials (especially while eating) because why not

    @kadirertan8664@kadirertan86644 ай бұрын
    • Frr I've literally done projects in js still I'd watch whatever bro posts cus of the unique little things he teaches

      @ahamednafees9961@ahamednafees99613 ай бұрын
    • dont be in tutorial hello bro

      @farhanarahman9375@farhanarahman937522 күн бұрын
    • ​@@farhanarahman9375 Hello. Yes, you are right. It might seems like tutorial hell but I enjoy watching fundamentals and thats my method for practice fundamentals quickly.

      @kadirertan8664@kadirertan866422 күн бұрын
  • im so glad you're making more backend specific videos

    @pastori2672@pastori26724 ай бұрын
    • what do you mean "backend specific videos" ? where can i find those ?

      @shadyawad5383@shadyawad53833 ай бұрын
    • @@shadyawad5383 stuff like interacting with other servers and using APIs http requests databases etc.. theres plenty of videos about them

      @pastori2672@pastori26723 ай бұрын
    • aren't these used in FE too?

      @jawad_youtube@jawad_youtube2 ай бұрын
  • Thanks mate for your great videos, they help a lot!

    @CatholicWeeb@CatholicWeeb4 ай бұрын
  • love every JS series

    @jiyoungkim9258@jiyoungkim92584 ай бұрын
  • Brilliant video!

    @DeltaXML_Ltd@DeltaXML_Ltd2 ай бұрын
  • terimakasih bang, sangat membantu.

    @dandana5767@dandana576726 күн бұрын
  • hey bro. you plan to make node js and express js tutorial?

    @ofekcohen6559@ofekcohen65594 ай бұрын
  • i learned a lot of things from you as a noob. now i point my friends who are learning to you channel and they really like it

    @mraloush8959@mraloush89594 ай бұрын
  • hey Bro I started this series almost a month ago, I have been struggling with JavaScript for a long time. But you videos are gold dude!! THANKS For your explanations 🤗🤗 Which course do you thing we should try after this one? GREETINGS FROM COLOMBIA LATIN AMERICA 🤩

    @vallunacoder.wecodetogether@vallunacoder.wecodetogether3 ай бұрын
  • Hey How about a tutorial for a low level language such as assembly language? I would also like to say that your cideos been a great help even if its just a hobby.

    @user-vx1ii2ic4v@user-vx1ii2ic4v4 ай бұрын
  • sup, u plannin next video for this one? Im learning json and ur videos help me a lot

    @oybekx3d@oybekx3dАй бұрын
  • yo bro can you please make an advanced c++ tutorial that talks about vectors and polymorphism, encapsulation, abstraction, and the auto keyword, and also new features added to the latest version please

    @laperplayz1388@laperplayz13884 ай бұрын
  • hey thanks bro, are you thinking about making more back end tutorials? i noticed you have a mySQL course but not really node js or anything else

    @hunin27@hunin274 ай бұрын
    • 2024 is amazing bro, thank you so much

      @hunin27@hunin274 ай бұрын
    • @@BroCodez i would love a node.js one from you specifically bcs i just understand u all the time

      @mraloush8959@mraloush89594 ай бұрын
    • @@BroCodez ur the goat, please share some social media to follow u bro

      @samilqs@samilqs4 ай бұрын
  • @BroCodez why are you creating a new javascript playlist, will the old one be deleted ?

    @cpu_governor@cpu_governor4 ай бұрын
  • Can you do a node js course?

    @doronfeldman5152@doronfeldman51524 ай бұрын
  • Bro can you please make unity or Unreal engine 5 Tutorial.

    @sreenandhm6319@sreenandhm63193 ай бұрын
  • Please we need an angular tutorial

    @seifeddinejaziri9312@seifeddinejaziri93122 ай бұрын
  • Week 3 of asking for bro code to make a typescript series

    @Swxfty_@Swxfty_4 ай бұрын
  • fetch isnt working for me at all. It is unable to read local json files.

    @kartickm2022@kartickm202210 күн бұрын
KZhead