标签:
//targetJson 目标JSON,packJson 被组装JSON function addGroupJson(targetJson, packJson){ if(targetJson && packJson){ for(var p in packJson){ targetJson[p] = packJson[p]; } } return targetJson; } var json1 = {"name":"nikita"}; var json2 = {"password":"1111"}; var result = addGroupJson(json1, json2); alert(result);
标签:
原文地址:http://www.cnblogs.com/jiemoo/p/5661504.html