var jsondata = {"name1":"value1","name2":"value2"};
//测试
alert(jsondata.name1);
给你个网址,看了就知道了
数组可以这样定义:
[{ },{ }]
www.ibm.com/developerworks/cn/web/wa-lo-json/
1、js中jsonArray对应的就是数组
var ja = ['a','b','c'];
2、jsonObject对应的就是对象
var jo = {"key1":"2","key2":"3"};
3、两者可以组合
var jao = [{"k":"a","k2":"b"},{"r":"2"}];