一个是怎样创建JSON:
var obj = {}; obj[‘name‘] = value; obj[‘anotherName‘] = anotherValue;
ips[ipId] = {}; ips[ipId][‘name‘] = value; ips[ipId][‘anotherName‘] = anotherValue;
bracket尽管写起来麻烦一些,可是能够避免非常多错误!
http://stackoverflow.com/questions/4071499/dynamically-add-variable-name-value-pairs-to-json-object
http://www.dev-archive.net/articles/js-dot-notation/
http://stackoverflow.com/questions/7102704/how-to-use-variables-in-dot-notation-like-square-bracket-notation
项目中发现的一些关于JavaScript中JSON的注意点,布布扣,bubuko.com
原文:http://www.cnblogs.com/hrhguanli/p/3816869.html