Learn JSON files in 10 minutes! 📄

#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

Пікірлер: 31

  • @BroCodez
    @BroCodez5 ай бұрын

    // 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));

  • @kadirertan8664
    @kadirertan86645 ай бұрын

    even though i have watched so many JS tutorials i still watch bro's tutorials (especially while eating) because why not

  • @ahamednafees9961

    @ahamednafees9961

    5 ай бұрын

    Frr I've literally done projects in js still I'd watch whatever bro posts cus of the unique little things he teaches

  • @farhanarahman9375

    @farhanarahman9375

    2 ай бұрын

    dont be in tutorial hello bro

  • @kadirertan8664

    @kadirertan8664

    2 ай бұрын

    ​@@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.

  • @pastori2672
    @pastori26725 ай бұрын

    im so glad you're making more backend specific videos

  • @shadyawad5383

    @shadyawad5383

    5 ай бұрын

    what do you mean "backend specific videos" ? where can i find those ?

  • @pastori2672

    @pastori2672

    5 ай бұрын

    @@shadyawad5383 stuff like interacting with other servers and using APIs http requests databases etc.. theres plenty of videos about them

  • @jawad_youtube

    @jawad_youtube

    3 ай бұрын

    aren't these used in FE too?

  • @CatholicWeeb
    @CatholicWeeb5 ай бұрын

    Thanks mate for your great videos, they help a lot!

  • @jiyoungkim9258
    @jiyoungkim92585 ай бұрын

    love every JS series

  • @DeltaXML_Ltd
    @DeltaXML_Ltd4 ай бұрын

    Brilliant video!

  • @kartickm2022
    @kartickm2022Ай бұрын

    fetch isnt working for me at all. It is unable to read local json files.

  • @ofekcohen6559
    @ofekcohen65595 ай бұрын

    hey bro. you plan to make node js and express js tutorial?

  • @laperplayz1388
    @laperplayz13885 ай бұрын

    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

  • @vallunacoder.wecodetogether
    @vallunacoder.wecodetogether4 ай бұрын

    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 🤩

  • @user-vx1ii2ic4v
    @user-vx1ii2ic4v5 ай бұрын

    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.

  • @mraloush8959
    @mraloush89595 ай бұрын

    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

  • @oybekx3d
    @oybekx3d3 ай бұрын

    sup, u plannin next video for this one? Im learning json and ur videos help me a lot

  • @cpu_governor
    @cpu_governor5 ай бұрын

    @BroCodez why are you creating a new javascript playlist, will the old one be deleted ?

  • @doronfeldman5152
    @doronfeldman51525 ай бұрын

    Can you do a node js course?

  • @hunin27
    @hunin275 ай бұрын

    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

    @hunin27

    5 ай бұрын

    2024 is amazing bro, thank you so much

  • @mraloush8959

    @mraloush8959

    5 ай бұрын

    @@BroCodez i would love a node.js one from you specifically bcs i just understand u all the time

  • @samilqs

    @samilqs

    5 ай бұрын

    @@BroCodez ur the goat, please share some social media to follow u bro

  • @dandana5767
    @dandana57672 ай бұрын

    terimakasih bang, sangat membantu.

  • @sreenandhm6319
    @sreenandhm63195 ай бұрын

    Bro can you please make unity or Unreal engine 5 Tutorial.

  • @GuyTheDude47
    @GuyTheDude474 күн бұрын

    How do you write the json to the actual file though? As in changing/adding to the data in the names.json and people.json and such?

  • @seifeddinejaziri9312
    @seifeddinejaziri93124 ай бұрын

    Please we need an angular tutorial

  • @Swxfty_
    @Swxfty_5 ай бұрын

    Week 3 of asking for bro code to make a typescript series

  • @stingy.ae1
    @stingy.ae125 күн бұрын

    bro code , please do oop tutorial please , love you