Adsense
Popular Posts
- Code update from PHP 7.4 to PHP 8.1 - PhpSpreadsheet
- MySQL workbench -"Could not decrypt password cache"
- Code update from PHP 7.4 to PHP 8.1 - Worksheet/Iterator.php
- Rendering HTML tags inside textarea
- axios handle blob type data
- Unix Utils and wget in Windows
- increase mysql query speed
- Setup vi syntax for PHP
- EXCEL return to the next line in the same cell
- Get WAMP running on EC2
Saturday, March 1, 2014
JSON: JavaScript Object Notation.
Similar to XML, JSON is used to store message in JavaScript. But JSON is smaller than XML and easy to parse.
JSON format:
a name followed by colon, followed by a value, such as
"fruit":"apple"
i.e fruit = "apple"
JSON object using curly bracket
var temp={"fruit":"apple", "juice":"orange"}
To access JSON object value:
temp.fruit, temp,juice
JSON array using square bracket:
var JSONarray= {
"food":[
{"fruit":"apple", "juice":"orange"},
{"fruit":"banana", "juice":"watermelon"}
]
}
To access the value fruit in array
JSONarray.food[0].fruit
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment