Welcome back, guys, in the previous lecture.
We have completed the Hashd middle part of our JavaScript Aminals project.
Now, in this video, we are going to perform the AP operation using the JavaScript.
So in order to perform AIBA operations, using the query or JavaScript, we have to use the ATM.
So first we have to write the script.
In this Tamalpais script, something is equal to dogsleds index doges.
So then in our next hour we can continue with the Ajax method so all our daughter objects, Buranda
says.
So this is the ADEX method.
In this we are having four different parameters.
The first one will be IPE.
Which type of request you are sending.
We are sending only get request.
That means we are getting the data from the API secondees you all.
So as I said, I have posted the link in the description and this is the link.
Copperhill and.
After all, we are having to call back function, the first one is success and the second one is error.
I will write the first callback function success.
If our goal is success, then I will bring the response in the console function.
It will take the parameters response.
Console Portlock, sorry, console log response, and if it is having any error, we have to print the
error.
Function.
Sorry, here, the parameter name is error console log error controls it.
Now we need to execute the program to check whether we are getting the data from the building successfully
or not.
So this is our application.
Refresh the page.
Now open the console here again.
See, we got the data.
We got an object in that object.
We are having one array which is called as the emails.
So here you can see in that means that we are having total 13 objects, including Zettl.
So our index starts with zero.
So there are two indexes.
That means that in items.
So for every index, that means for every object we are having three properties, ideally ATSDR minister
middle name, that means item name.
And the last one is item image.
So with the help of these data, we have to create the dynamic bill and we need to add that to the these
emails here.
You can see we have we have given it my items.
And for this from these objects, we have to create a new item for every iteration and we have to add
all the items to the my items do so or an index Georgias.
Now, instead of reading the response in the console, sorry, now I will print the response as a response.
That means then you can able to get a complete array only array we will get.
Sorry, we have not got the area yet.
My last meal spelling is wrong, you scandalous.
Americans eat, so if you bring console, if you bring to respond to your meals in the console, we
will get the only area with the 13 objects.
Now, we can look through this area as like our previous project.
So how can we do that with the help of for loop?
So remote control element and right for loop for all we are equal to zero.
Ask then what I'll ask them, responds Darter.
Meals not linked because responses and object means an array length is the property which is used to
available for only array only response short meals at length and I placeless.
And for every iteration we have to create one dynamic duo with the three columns control.
So now I will create that new item.
Equal to Soheir, also, I'm going to use the backpack's that means interpellation, so with the help
of Dollar and Cali Brazil's, we can use the external variables instead of using the surplus concatenation
all those years texada.
So first back then, we have to create one to
do it.
Also the.
So this is the deal for the deal.
I will apply that last name as.
Call me three and in the deal, the first one will be PAETEC.
But in these spee, we have to mention the name, name of the item, so the name of the item is generated
by a star meal, a star capital, meaning small sorry, star, small Emmis Capital, a star meal after
paragraph.
We have to represent the image Ameritech.
So these are India, we have to give the Assads the attribute and plus, as I am, Duflo is sars-cov-2.
Sorry.
A steel mill town, steel mill town.
Let me check whether it is correct or not, the stadium would be our capital.
So here you can see the capital and the last one will be M.I.T., M.I.T. also, we have to represent
in the paragraph only.
Pete and Melody is denoted by, let me check it, M. Haiti's capital, a miss it is Molly Miss Capital.
I mean, sorry, here, I forgot to write Dowland Square collaborator's.
Yeah, that's it.
So this is the new item.
And for every edition, we have to add this new item to our bill and I will add one more class to do
this.
Do is M two.
That means margin 20.
This is the butcher plus column military and the margin 20.
So now I will add this new item to the my items bill.
So my items is a.
So that's the reason I need to write, assemble my items here.
I will write and not add up and append we have to open new item for every iteration that is.
No, let me rephrase the page.
It should work.
Here you can see we got another ETR mail is not defined.
Sorry, sorry, we forgot something here.
We I forgot to write a response to Melsa.
So here for every decision, we have to write the same thing.
So response to Dr. M. Soffer I saw here, if I gotta write this, I don't mean comptrollers because
we are ideating every object in the array.
So I have written directly property name for all the products.
And so first we have we have to write the array and the respective object response.
Daughter Meals of a daughter, WJR Meltem comptrollers are also entitled to the same thing.
Response, daughter responses and object means is an idea.
And I use the index of the area and the item is the property control as it should bogarting.
So the refresh here gansey know we got the output so later we will stylist's.
As of now, this is our output.
So we got different images with the ideas and names.
So you can see this is the image name, that means middle name and this is the middle image and this
is the milady.
So we gotta respond successfully and we have printed the response in our history page.
Now we are left with only one thing that is adding ccis.
So in the next lecture we are going to add this to our project.
Thank you.