JS多个对象添加到一个对象中

var obj1 = {"qq":10};

var obj2={"mm":2,"nn":3};

var obj3={"xx":1,"yy":5};

obj1.field1 = obj2;

obj1.field2 = obj3;

console.log(obj1)

posted @ 2017-07-03 16:18  Rainyn  阅读(6315)  评论(0编辑  收藏  举报