Learn JSON files in 10 minutes! 📄

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 ธ.ค. 2024

ความคิดเห็น • 43

  • @BroCodez
    @BroCodez  ปีที่แล้ว +16

    // 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
    @kadirertan8664 ปีที่แล้ว +51

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

    • @ahamednafees9961
      @ahamednafees9961 11 หลายเดือนก่อน +6

      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 8 หลายเดือนก่อน

      dont be in tutorial hello bro

    • @kadirertan8664
      @kadirertan8664 8 หลายเดือนก่อน

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

    • @sheaxchen
      @sheaxchen 5 หลายเดือนก่อน

      damn i'm literally eating now

  • @pastori2672
    @pastori2672 ปีที่แล้ว +28

    im so glad you're making more backend specific videos

    • @shadyawad5383
      @shadyawad5383 11 หลายเดือนก่อน

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

    • @pastori2672
      @pastori2672 11 หลายเดือนก่อน

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

    • @jawad_youtube
      @jawad_youtube 10 หลายเดือนก่อน +3

      aren't these used in FE too?

    • @m7mdMAH5
      @m7mdMAH5 5 หลายเดือนก่อน

      Yes, not only used but required..
      @jawad_youtube

  • @jiyoungkim9258
    @jiyoungkim9258 ปีที่แล้ว +5

    love every JS series

  • @CatholicWeeb
    @CatholicWeeb ปีที่แล้ว +3

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

  • @ofekcohen6559
    @ofekcohen6559 ปีที่แล้ว +9

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

  • @bonnymich
    @bonnymich 4 หลายเดือนก่อน

    I love you! you are my god man make more of this! FREE KNOWLEDGE GAWD I LOVE YOU

  • @DeltaXML_Ltd
    @DeltaXML_Ltd 10 หลายเดือนก่อน +1

    Brilliant video!

  • @oybekx3d
    @oybekx3d 9 หลายเดือนก่อน +1

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

  • @hunin27
    @hunin27 ปีที่แล้ว +3

    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 ปีที่แล้ว +1

      2024 is amazing bro, thank you so much

    • @mraloush8959
      @mraloush8959 ปีที่แล้ว

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

    • @samilqs
      @samilqs ปีที่แล้ว

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

  • @doronfeldman5152
    @doronfeldman5152 ปีที่แล้ว +2

    Can you do a node js course?

  • @mraloush8959
    @mraloush8959 ปีที่แล้ว +3

    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

  • @laperplayz1388
    @laperplayz1388 ปีที่แล้ว +2

    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.wecodetogether 11 หลายเดือนก่อน +2

    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 🤩

  • @kart_m
    @kart_m 8 หลายเดือนก่อน +3

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

    • @srinathg1045
      @srinathg1045 5 หลายเดือนก่อน

      same here! Did you rectified this error?

    • @cIRIgyonyoru
      @cIRIgyonyoru 2 หลายเดือนก่อน

      Everything works for me🤷‍♀

    • @thefurnituredeals4783
      @thefurnituredeals4783 หลายเดือนก่อน

      in people.json after true or false make sure you don't have a comma, this was the mistake I had

  • @Kwik_63
    @Kwik_63 6 หลายเดือนก่อน

    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?

  • @gpu_governor
    @gpu_governor ปีที่แล้ว

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

  • @sreenandhm6319
    @sreenandhm6319 11 หลายเดือนก่อน +1

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

  • @speedlearner
    @speedlearner 4 หลายเดือนก่อน

    What if you have created a JSON file and you want to display the JSON data inside a HTML textbox? I noticed that you didn't mention this in your video.

  • @sharelessness
    @sharelessness 2 หลายเดือนก่อน

    I am trying to work on a json code I found on the internet and trying to make some changes but results makes no sense to me at all. so hopefull after watching this video I will write my own json things

  • @PaulinaMabalay
    @PaulinaMabalay ปีที่แล้ว

    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.

  • @Swxfty_
    @Swxfty_ ปีที่แล้ว +2

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

  • @dandana5767
    @dandana5767 8 หลายเดือนก่อน

    terimakasih bang, sangat membantu.

  • @seifeddinejaziri9312
    @seifeddinejaziri9312 10 หลายเดือนก่อน

    Please we need an angular tutorial

  • @travisScottFan3
    @travisScottFan3 3 หลายเดือนก่อน

    {
    "comment": "Thank you!",
    "thumbsUp": 0
    }

  • @exactmidnight
    @exactmidnight 5 หลายเดือนก่อน

    I'm watching it cuz I can

  • @SoniyaMojumder-k3d
    @SoniyaMojumder-k3d 3 หลายเดือนก่อน

    Johnson Amy Hernandez Karen Garcia Kimberly

  • @GarciaTheresa-t1o
    @GarciaTheresa-t1o 3 หลายเดือนก่อน

    Wilson Betty Martin Margaret Taylor Steven

  • @GaryWilson-u9v
    @GaryWilson-u9v 2 หลายเดือนก่อน

    White Jessica Wilson Shirley Clark Maria