WEBVTT

00:01.040 --> 00:08.270
So in order to actually print out the job titles one by one, instead of all of it into one big string,

00:08.270 --> 00:11.810
we can put it into a each loop instead.

00:13.130 --> 00:15.080
Of all the title prop classes.

00:15.080 --> 00:17.900
So what that looks like it's something like this.

00:17.930 --> 00:20.990
We instead of a dot text we say dot each.

00:21.110 --> 00:25.430
And inside this each loop we have an index and an element.

00:26.390 --> 00:36.500
And then we simply do an arrow function and we can do a console log of the again we call the uh, jQuery

00:36.500 --> 00:40.940
selector with the element we also have in here because it is a jQuery element.

00:40.940 --> 00:44.630
And then we get the text from the jQuery element.

00:46.020 --> 00:48.270
So that looks something like this.

00:48.270 --> 00:52.950
And then we get all of the titles one by one.

00:54.300 --> 00:55.560
So pretty cool.

00:55.560 --> 00:59.820
Now let's try and put this inside of NodeJS.

01:01.590 --> 01:05.640
So what we do here is let's go inside NodeJS.

01:06.150 --> 01:10.080
We delete the console log with just a pure HTML here.

01:10.080 --> 01:13.140
And then we try and put this statement in here instead.

01:13.350 --> 01:21.060
But before we can start using this dollar sign or this jQuery selector we need to create it first inside

01:21.060 --> 01:22.200
of Node.js.

01:22.620 --> 01:33.630
So to do that we take the we go and say const dollar sign, cheerio dot load and put in this HTML page

01:33.630 --> 01:35.940
that we outputted in console log before.

01:36.630 --> 01:40.950
So in this way we create our own jQuery inside of NodeJS.

01:41.970 --> 01:44.280
Now let's try it and see what happens.

01:44.280 --> 01:45.690
If you want this code.

01:47.450 --> 01:48.500
And there we go.

01:48.500 --> 01:55.040
You can now see that we get all of the job titles printed out one by one, which is really good, because

01:55.040 --> 02:00.410
then that means that we can, uh, put them into separate objects and so forth.

02:01.610 --> 02:06.770
Now there's one more thing we want to get, which is the job URL.

02:06.770 --> 02:10.460
So the URL that each job is pointing to with the description.

02:10.460 --> 02:13.460
And that's what we're going to be looking at in the next section.
