1
00:00:08,520 --> 00:00:16,620
Let's talk about another method we can use to attract over object and that is object dot keys.

2
00:00:19,420 --> 00:00:21,850
What is this one object that keys.

3
00:00:21,850 --> 00:00:22,810
Which is this?

4
00:00:23,840 --> 00:00:28,160
So let's see how this one also make possible to outrage over objects.

5
00:00:28,190 --> 00:00:31,490
Remember, we are making of the person object.

6
00:00:31,820 --> 00:00:32,930
So here.

7
00:00:32,960 --> 00:00:33,860
Here we go.

8
00:00:33,890 --> 00:00:35,390
This one is pretty simple to do.

9
00:00:35,390 --> 00:00:36,740
So const.

10
00:00:36,770 --> 00:00:38,570
Let's say my keys.

11
00:00:39,920 --> 00:00:49,310
Remember the kiss inside our object is equal to uppercase objects dot keys then pass in the object which

12
00:00:49,310 --> 00:00:51,020
is my person object here.

13
00:00:51,560 --> 00:00:54,080
To pass in person object.

14
00:00:54,290 --> 00:00:57,080
But for this one, let me remove this console here.

15
00:00:57,110 --> 00:00:57,500
This.

16
00:00:57,500 --> 00:00:58,550
I mean the syntax for.

17
00:00:58,550 --> 00:00:59,210
For loop.

18
00:00:59,540 --> 00:01:00,860
For this one.

19
00:01:00,860 --> 00:01:03,050
Let's see my keys here.

20
00:01:03,800 --> 00:01:04,129
It.

21
00:01:04,129 --> 00:01:06,560
Put it in an array.

22
00:01:06,860 --> 00:01:14,270
We see that we got all the properties or the values and put them in an array.

23
00:01:14,930 --> 00:01:19,850
So this one is in contrast with the object.

24
00:01:19,850 --> 00:01:22,280
I mean, the for in loop, right?

25
00:01:22,280 --> 00:01:23,330
For in loop.

26
00:01:23,480 --> 00:01:24,140
We get it.

27
00:01:24,140 --> 00:01:28,460
But this is the modern way of doing this simplest way of doing this easy.

28
00:01:28,460 --> 00:01:28,910
Right.

29
00:01:28,910 --> 00:01:35,670
But I think if we want to get an individual record here, unless you also go another level and get the

30
00:01:35,690 --> 00:01:41,660
individual properties in a separate entity like on like put them in an array.

31
00:01:42,380 --> 00:01:50,420
So for this one, we can check that if a certain property exists on an object.

32
00:01:50,930 --> 00:02:03,080
So first is we can convert this one from object and put the values inside an array and then we can use

33
00:02:03,080 --> 00:02:08,680
another method to loop through, for example, for loop or for each loop.

34
00:02:08,690 --> 00:02:14,000
And then I'm going to check if there's a first name on the array.

35
00:02:14,000 --> 00:02:17,450
Then we can add or do whatever we want with it.

36
00:02:17,840 --> 00:02:21,020
That is it about the the object or keys.

37
00:02:21,320 --> 00:02:26,090
So before we end up, let me show you another method called for.

38
00:02:26,090 --> 00:02:27,440
Each could have one.

39
00:02:27,590 --> 00:02:33,410
We are going to talk about it and used to loop through data many times.

40
00:02:33,410 --> 00:02:39,400
Again, we have a specific section and advanced JavaScript.

41
00:02:40,380 --> 00:02:45,620
We'll talk about all these things fall in loop and info and the map and many more.

42
00:02:45,710 --> 00:02:51,000
For the meantime, I just want to show you what the for each loop is.

43
00:02:51,020 --> 00:02:51,920
Then this video.

