Let's talk about another method we can use to attract over object and that is object dot keys.
What is this one object that keys.
Which is this?
So let's see how this one also make possible to outrage over objects.
Remember, we are making of the person object.
So here.
Here we go.
This one is pretty simple to do.
So const.
Let's say my keys.
Remember the kiss inside our object is equal to uppercase objects dot keys then pass in the object which
is my person object here.
To pass in person object.
But for this one, let me remove this console here.
This.
I mean the syntax for.
For loop.
For this one.
Let's see my keys here.
It.
Put it in an array.
We see that we got all the properties or the values and put them in an array.
So this one is in contrast with the object.
I mean, the for in loop, right?
For in loop.
We get it.
But this is the modern way of doing this simplest way of doing this easy.
Right.
But I think if we want to get an individual record here, unless you also go another level and get the
individual properties in a separate entity like on like put them in an array.
So for this one, we can check that if a certain property exists on an object.
So first is we can convert this one from object and put the values inside an array and then we can use
another method to loop through, for example, for loop or for each loop.
And then I'm going to check if there's a first name on the array.
Then we can add or do whatever we want with it.
That is it about the the object or keys.
So before we end up, let me show you another method called for.
Each could have one.
We are going to talk about it and used to loop through data many times.
Again, we have a specific section and advanced JavaScript.
We'll talk about all these things fall in loop and info and the map and many more.
For the meantime, I just want to show you what the for each loop is.
Then this video.