Read/Write JSON Files with Node.js

Поделиться
HTML-код
  • Опубликовано: 25 окт 2024

Комментарии • 76

  • @bobmonsour
    @bobmonsour 5 месяцев назад

    An excellent tutorial. And it's exactly what I was looking for as I am about to embark on writing a simple editor for a very specific json file. I will be the sole user and the file is not terribly large, so I am not concerned about multiple users editing the file at the same time. And it's great that you have a written version of this for reference. Thank you!

  • @dhruvsanmotra6187
    @dhruvsanmotra6187 2 года назад

    I was searching for json read write whole day then found your vedio.......
    Just 10 min but explained every thing😍

  • @mohdhussain5918
    @mohdhussain5918 3 года назад +2

    Bro.... What a teaching skill.... Cleared all doubts in single video👍

  • @prathmeshkalehere
    @prathmeshkalehere 7 месяцев назад

    Your voice is sooo soothing

  • @domaincontroller
    @domaincontroller 3 года назад

    Finally after zapping over 2 tons of inconsistent fs module tutorials, i got he good one ! Damn it

  • @hatdoggo8824
    @hatdoggo8824 4 года назад +6

    Best tutorial ever.. Keep up the great work!

  • @agustinpena2752
    @agustinpena2752 Год назад

    Thank you for the tutorial, it's very informative ))) Please consider using your IDE with a dark theme when making your videos, it's hard to watch this at night 😅

  • @sqb8980
    @sqb8980 2 года назад

    Underrated channel

  • @kostiantynkarzhanov9216
    @kostiantynkarzhanov9216 Год назад

    Very good tutorial, consice and easy to understand! Thank you so much! 💛

  • @Cessarini1
    @Cessarini1 3 года назад +1

    Hey, just want to thank you for making this video tutorial. Cheers

  • @kentang9486
    @kentang9486 3 года назад +2

    You explained really clearly. Nice tutorial. Great work!

  • @mateonavarrette4864
    @mateonavarrette4864 2 года назад +1

    Very clearly explained, thanks for the help! I had trouble trying to push a new item into an array in a json document, and this cleared some things up for me

    • @gethermedel3620
      @gethermedel3620 2 года назад

      what happens if you actually have 2 or 3 json objects in the file? how do you handle to update them? can you share it with me?

  • @DerCooleVonDem
    @DerCooleVonDem 3 года назад

    Best Tutorial ever MADE

  • @xef6283
    @xef6283 3 года назад

    I've been wandering for hours now, looking for JSON read/file help in Node.js (newbie here). Loading JSON faking a web request/response just wasn''t for me and for the project I'm currently on, yet it seemed the only, or at least the "way more popular" way (why in the world? you already possess the *.json file locally... just wondering). I can't really describe how big is my wish to say "Thank you". Thank you for existing, this video is exactly what I needed.

  • @DirtMankee
    @DirtMankee 2 года назад

    Thanks for the wonderful explanation. Helped me alot.

  • @pileydes
    @pileydes 3 месяца назад

    Thank you for this great video.

  • @anitahemrajani1373
    @anitahemrajani1373 3 года назад

    Very clearly and simply explained. Thankyou.

  • @microfox_hd3042
    @microfox_hd3042 3 года назад +1

    Thanks amazing tutorial gained a new sub

    • @heynode
      @heynode  3 года назад

      Thanks for the sub!

  • @dragunwf
    @dragunwf 2 года назад

    You explained it quite clearly, thank you!

  • @omarsherif6198
    @omarsherif6198 3 года назад

    Nice tutorial, interested to watch you covering other topics too

    • @heynode
      @heynode  3 года назад

      Hey thanks Omar. What other topics in particular would you like to see?

    • @gethermedel3620
      @gethermedel3620 2 года назад

      @@heynode how do you actually handle this if you have 2 or more json object?

  • @sarangjaiswal
    @sarangjaiswal 4 года назад +2

    Thanks! Nice explaination

  • @thed100mechanic
    @thed100mechanic 4 года назад +1

    Really nice tutorial, thank you!

  • @septimusforster
    @septimusforster 10 месяцев назад

    Splendid stuff.

  • @ashishnayak2666
    @ashishnayak2666 3 года назад

    Very nice example

  • @pradipspeaks9395
    @pradipspeaks9395 Год назад

    Very nice.
    Please make us learn the same thing in Typescript as well 🙏

  • @dawsonhorn5290
    @dawsonhorn5290 3 года назад

    Great tutorial. Thanks a ton.

  • @ahmedstutorials3357
    @ahmedstutorials3357 3 года назад

    Thank you bro, helped me alot.

  • @ABUTAHER-wg7gz
    @ABUTAHER-wg7gz 2 года назад

    Tutorial starting time show require file then without require system, you are show data??

  • @emadroghani1856
    @emadroghani1856 3 года назад

    Super easy example help nobody in practice

  •  3 года назад

    Great video, thanks!

  • @wivon
    @wivon 3 года назад

    Good video ! (why you use light mode? lmao )

  • @navajyothiboppidi6410
    @navajyothiboppidi6410 3 года назад

    very good information. Thanks for sharing.

  • @kurtismelkisoft4309
    @kurtismelkisoft4309 Год назад

    tout ça c'est beau mais comment on fait pour utiliser les données dans un vrai programme javascript?

  • @bestapps4709
    @bestapps4709 Год назад

    Can this NODE be used like js, without libraries buddy?

  • @Tiberiumgod
    @Tiberiumgod 2 года назад

    How can we parse chunks as valid JSON? What if we have a huge json file and want to make some logic for chunks?

  • @willmcdonnell287
    @willmcdonnell287 3 года назад

    great video. Thank you!

  • @anuanusha73
    @anuanusha73 2 года назад

    may i know how to convert a text file to json in nodejs

  • @_ShaikhMohammedFazleHaqueAmin
    @_ShaikhMohammedFazleHaqueAmin Год назад

    i am having problem in reading and writing it is saying file not exists only way i was able to read it using require() can any one help me

  • @exclusivestudios
    @exclusivestudios 2 года назад

    Thank you very much!

  • @alfonstabz9741
    @alfonstabz9741 3 года назад

    i need to put a type: module in json file but don't know how to do it

  • @falecommoraes
    @falecommoraes Год назад

    This error - ReferenceError: JSONReader is not defined at Object. - on Update code. :(

    • @eojthebrave
      @eojthebrave Год назад +1

      The function jsonReader() was defined earlier in the video at ruclips.net/video/HrjC6RwEpt0/видео.html, you'll need to make sure that function exists before writing the update code. Hope that helps.

  • @ok-alarm
    @ok-alarm 2 года назад

    You're the best!

  • @zaahidfarooq
    @zaahidfarooq 3 года назад

    How we can add data in json file without erasing/deleting the exist data on the json file

  • @alexandregilardeau870
    @alexandregilardeau870 2 года назад

    thank you help a lot !

  • @kumar_sanjeevdutta1069
    @kumar_sanjeevdutta1069 11 месяцев назад

    Great and just great

  • @NotoriousArnav
    @NotoriousArnav 2 года назад

    Nice tutorial, just hated the light theme

  • @mahendrasinhgohil44
    @mahendrasinhgohil44 3 года назад

    How to do same with react native?

  • @IslamTheRightWay10
    @IslamTheRightWay10 Год назад

    is fetch() not a good move to use to get data from json file?

    • @eojthebrave
      @eojthebrave Год назад +1

      I think you would want to use fetch() if the .json file was served over HTTP and you had to request it from another server. And fs.readFile for files on the same filesystem.

  • @bibekgurung9075
    @bibekgurung9075 2 года назад

    How do you do this on react?

  • @swarnavasireddy6150
    @swarnavasireddy6150 3 года назад

    But on build this is not working

  • @Cdswjp
    @Cdswjp 3 года назад

    does fs.readFile always read the current state of the file BECAUSE it's an async function?... or are those 2 separate pieces of information?

    • @eojthebrave
      @eojthebrave 3 года назад

      Two different bits of information. The important piece here is that using something like `require('./file.json')` loads the file's content into the node.js memory cache and it's possible that subsequent calls will return the cached result instead of reading the file from disk again. `fs.readFile` will always ready the file from disk whenever it is executed.

  • @ivgilevinsonkaslasi5778
    @ivgilevinsonkaslasi5778 4 года назад

    good job!

  • @rojka-_-
    @rojka-_- Год назад +1

    tip, use dark mode

  • @locksawwatch1084
    @locksawwatch1084 2 года назад

    ReferenceError: jsonReader is not defined
    EDIT: Nvm i just looked at tutorial on google(your video on website)

  • @dailymeow3283
    @dailymeow3283 3 года назад

    Hey thank you for these videos, is there a function i could write to send json data to my email ?

    • @eojthebrave
      @eojthebrave 3 года назад +1

      I've not done it myself, but it looks like you could accomplish this with nodemailer.com/usage/. Using something like the jsonReader() function in this tutorial, and then instead of console.log() to output the data write a function that uses ndoemailer to send an email that contains the data you've read in.

    • @dailymeow3283
      @dailymeow3283 3 года назад

      @@eojthebrave thanks Joe

    • @dailymeow3283
      @dailymeow3283 2 года назад

      @An A Count lol

  • @shubhamambhore5707
    @shubhamambhore5707 3 года назад

    🔥🔥🔥🔥 Thanks

  • @jatinsinghal6438
    @jatinsinghal6438 2 года назад

    i am not able to get address

  • @domaincontroller
    @domaincontroller 3 года назад +1

    07:00 fs.writeFile

  • @mucahitkaraoglan224
    @mucahitkaraoglan224 3 года назад

    perfect

  • @유승모-f8m
    @유승모-f8m Месяц назад

    감사합니당

  • @nicolaslegrand3367
    @nicolaslegrand3367 3 года назад

    good game

  • @ABUTAHER-wg7gz
    @ABUTAHER-wg7gz 2 года назад

    are you kiding with public?

  • @mikhailwebb8377
    @mikhailwebb8377 Год назад

    I keep getting an error. Javascript is possible the worst programming language.

  • @PlayboyPrime
    @PlayboyPrime 2 года назад

    Thanks for your help :)