向json中添加新的熟悉或对象 Add new attribute (element) to JSON object using JavaScript

How do I add new attribute (element) to JSON object using JavaScript?

JSON stands for JavaScript Object Notation. A JSON object is really a string that has yet to be turned into the object it represents.

To add a property to an existing object in JS you could do the following.

方法1

object["property"] = value;

方法2

object.property = value;
上一篇:Windows server 2008 r2搭建FTP服务器


下一篇:[ActionScript] AS3解决html与flash鼠标滚轮冲突的问题