JSON Array

JSON array are composed inside square sections. Just like JavaScript, a JSON array can contain various object, It can store string, number, boolean or object in JSON array.

"student":[
    {"firstName":"mithilesh", "lastName":"Singh"}, 
    {"firstName":"Rahul", "lastName":"Smith"}, 
    {"firstName":"Petal","lastName":"kumar"}
]

In the example above, the object "student" is an array containing three items. Every item is a record of a man (with a first name and a last name).

JSON Array of Objects


 	{"student":[    
 	    {"name":"Rahul", "email":"rahul@gmail.com", "age":26},    
 	    {"name":"Suresh", "email":"suresh@gmail.com", "age":22},  
 	    {"name":"neha", "email":"neha@gmail.com", "age":20},    
 	    {"name":"mukesh", "email":"mukesh@gmail.com", "age":29}   
 	]}