So this is the website you can find here a video which will do a lot. So we will use those keys to create the JSON file. So row is tell you the number of objects in the JSON file, and then the value for each key. So for example, if we insert username, you can insert or for this user name, as any name, but if you just type user name, the website will give you a random name. And also for the first name here an example first name and just between curly brackets first name, it will give you a random name and also for less name and also, we have Mail. So here's an example.
And we have username and password. We also have phone. So in this way it just gave you are on the numbers, but you can make format for this form. So it gives you this shape. And those who can give it an ID, or make a date, and specify the date here, like this. And yours, you can give it an id like this is type number and it will give you a random number.
You can give a number between zero and hundred, or give it an input length. So it will give you a constant number. So here the length is five numbers, you can specify this length. So you can specify it as three numbers like this random number range And so many. So you can make an array here, yeah, here, x equal choose string array. So to give you this array, you can specify the length of the array like this.
And finally, you can make an object which consists of many rows, like what we have done for company branch, we created just one object for it, which should contain country and telephone. So let you create something and see this practical. So consider we have a JSON file for clients that contains their user name, email, password, and the company branches, which contain another two objects, country and phone number. So here for the URL, just type forward slash then Question mark and start typing narrows, which is the number of objects for the JSON file. So, Euro was equal to churros, for example, to see this. So we have two objects.
So we want to specify a user name. And it will be equal to curly brackets and user name. We can specify it manually, but this will give you a random user name. So instead of username here, you can type the value that you want, but it will be for the whole audience. So just make it user name to give you a random names and password equal to password mail equal to No company which contain two objects country and telephone. So, how we can do this, so to be equal to, but we will add here at side to define it as another object.
So, firstly to define the rows. So, the key changes two rows or two objects, but it should be within curly brackets which we see now. So, we have user name, password email and company branches which contain two objects. So, let me specify those objects. So, there always is two and asterik the first object which is country equal to country so, it will give you around the country, and then asterik on equal to foreign and make it from that sort of You see, so read the whole objects, username, password email, company crunches, which contain country and the phone number. So just copy the URL and paste it within the open function to access to this JSON file, and you can access to any data you want.
Or you can display all the data, of course using for loop. So we have seen how we can get data from a server using Ajax opening the request, then the method they are no for the server, then the function, you can use a load or already state change. And finally, don't forget to send the request. So that's We got access to their username and the password you can make within the JSON file and display all the data. Once we click a button or once we reload the page, it's up to you. You can try this once we click about next, show you how we can use this JSON file to make an advanced example.