JSON Tutorial

JSON.parse

JSON.parse(): The thing is that when we receive some data from the web server, it is always a string. When we parse the data with JSON.parse, the data becomes a JavaScript object. So, whenever we have received some string from the web server, and we need to make it a JavaScript object, we would simply

JSON.parse Read More »

Arrays in JSON

Arrays in JSON Now, we are going to have a look at a very simple, interesting, and important data type in JSON, which is an Array. Basically, you might be familiar with the term ‘array’, from some other programming language, but even if this term is completely new for you, do not worry, since we

Arrays in JSON Read More »

JSON Objects

JSON Objects Now, we are going to discuss in greater detail, the objects in JSON. The thing is that object here is going to be the collection of key-value pairs. So, whenever we need to have a collection of key-value pairs in our data, we can make use of objects here. Basically, to write the

JSON Objects Read More »

JSON Null Value

JSON Null Value Basically, null means absence of value(which means nothing). Whenever we are specifying some value as null, it simply means nothing. The null value is used to represent the intentional absence of any object value. For example: { “mobileNumber”:null, “emailAddress”:null } As you can see in the above example, the values for the

JSON Null Value Read More »