Home of web learners
www.webn3rd.com
json means javascript object notation
Json is used to transfer data as it is kidn of data format
Json used in api
Lets look into a json data
{
"area": "Newyork",
"areacode": 350,
"population": 100000
}
Its easy to use
Firstly you have to assign name,then its value
In below example,we use this json data
<!DOCTYPE html>
<html>
<head>
<title>json data use</title>
</head>
<body>
<script>
var jsondata = {
"area": "Newyork",
"areacode": 350,
"population": 100000
}
document.write(jsondata.areacode);
</script>
</body>
</html>
outptut:
350
so,here we assign json data into a variable,jsondata and by jsondata.areacode we are showing the value of areacode inside jsondata variable
webn3rd.com
About webn3rd