JavaScript Tip: Accessing JSON Data

preview_player
Показать описание
In previous tutorials I have talked about how to load JSON data or retrieve JSON data from a site. In this tutorial we will look at how to access that data once it is retrieved.

For more resources on JavaScript:

Courses offered on Udemy at a discount:

Mastering Regular Expressions in JavaScript:

Tutorials referred to in this video:

#javascript #AllThingsJavaScriptLLC
Рекомендации по теме
Комментарии
Автор

This has cleared up something that has baffled me for ages. Love this channel! You are a fantastic teacher!

russelldriver
Автор

Just a Python programmer here with limited web experience. I wanted to thank you very much for this tutorial. It was absolutely fantastic! Thank you very much.

AlCampopiano
Автор

Thank you so much! I'm a super noob and spent a ridiculous amount of time trying to figure out how to access my json data after sending a POST request. You are my hero!

aliciaromano
Автор

Almost 2 hours trying to figure out why my array was interpreted as empty inside my for loop, to figure it out in 10 minutes that's asynchronous thanks to your video, literally saved my morning, thank you!

trinoalvarez
Автор

There's something very aesthetically pleasing about the colors you use on your editor. Reminds me of woodwork.

Also great tutorial I've managed to get my objects from Json without an issue but accessing individual properties inside the objects is proving tricky.

izaakchater
Автор

Your tutorial was great. I spent an entire day yesterday trying to figure out how to obtain dynamic key value pairs . Good lord... thank you!

Dstonephoto
Автор

you are a lifesaver. I've been lookin all around for this solution and found your video at last..thank you

arjungjanardhanan
Автор

I just want ahead and send thank you.. Before i even watch the video... .I knew It will help.

samrey
Автор

Ahhh, finally....
I owe you one! you earned a new subscriber :D
Before watching this video, I've been getting undefined value just like shown here (6:23). So, I couldn't just figured out what to do to fix this and properly do some iteration on my JSON data.
Finally at end of the video, putting the iteration process inside a function made me huge sense to make the job done <3

Thank You ;)

alnahian
Автор

You deserve a mega like !! Thanks a lot sir

MohammadSalibi
Автор

Thank you thank you !!!! this helped me a lot

goklooz
Автор

Thanks I was looking for this like a week and you in 11 minutes solve it

AndrexYEAH
Автор

Thank you for sharing . Great Tutorial .

srilaxmimannu
Автор

How do you get the mainObj assigned so you can use it outside of the fetch. It seems weird to have to put all of my entire code inside a fetch just to make it able to access and play with the data?

RequiosWoW
Автор

thanks man
was stuck in the logging asynchronous thing for 2 hours

surendarmalai
Автор

Vet helpful video 👍🏼....how do I retrieve the info in the array? Like...how do I tell the program... grab the third item, send it to <p id=‘student’><p> in the HTML page?? Thanks in advanced 👍🏼

pjcocktail
Автор

Great channel! Thank you for making all these videos. No live reload/browser sync for sublime? by now, you should be sick of manually refreshing the browser ! :) cheers

Petar_Ral
Автор

Hello I tried your code out however it is not working. I dont whether I did something wrong or this code does not work for my program. Since my variable is not updated with the json data

isabellajessyl.cortes
Автор

Hello. I am making a Github user info reader. I am trying to fetch the user from the data but it won't work.
Here is my script:

let user;
let findUser = "Bigmancozmo";
.then(function(resp){
return resp.json();
})
.then(function(data) {
console.log(data)
user = data.login;
});
= user;

When i run it, it gives me no errors. But when i test it, it only replaces my text with "undefined, " not the user's name (the part in every Github user's json data that has their username.) It is supposed to be getting set to "Bigmancozmo, " and not "undefined." Even when i do something BESIDES the username, it does not work.

bigmancozmo
Автор

a question, imagine if we have very large JSON data, we dont want to do the request in all the large list and then format them in the front end, how do we get specific data without doing the request

DeathHordes