let consider you have Json object like: var objectValue= { "name": "mkyong", "age": 30, "address": { "streetAddress": "88 8nd Street", "city": "New York" }, "phoneNumber": [ { "type": "home", "number": "111 111-1111" }, { "type": "fax", "number": "222 222-2222" } ] } Ans:-
Json objects are written in ket/value pairs.Example:
{ "name":"John", "age":30, "car":null }
we can fetch above object by key value.When we will POST it through ajax callwe should stringyfy it like followings
JSON.stringify({ "name":"John", "age":30, "car":null })
JSON.stringify(obj)"obj" is json object.