一个是如何创建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://blog.csdn.net/fightforyourdream/article/details/28485673