首页
消防安全隐患排查和验收
域名转发系统
祺平订单系统
您所在的位置:首页 > jQuery > 正文

JQ 操作JSON 新增元素

539
依赖JQ, 只供参考:
function getNewJson(json) {
   if(json.length > 0){
      var newJson = [{}]; //定义JSON数组
      $.each(json, function (index, obj) {
            newJson[index] = obj; //新增对象
      });
      return newJson;
   }
   return null;
}


本文网址:http://www.14study.cn/show.asp?id=162

若本文章侵犯了您的著作权,请联系我删除 QQ:695898855

更多>>网友评论
发表评论