我有两个数组。我想连接两个数组值。但这里它显示错误,
NewsArr.contact不是函数
我的代码
var GlobalNews = [];
var CommentArray = [];
var CommentArr = {};
CommentArr['Comment'] = comment;
CommentArray.push(CommentArr);
var NewsArr = {};
NewsArr['NewsNo'] = $("#newsNumber").val();
NewsArr['Desc'] = $("#desc").val();
//GlobalNews.push(NewsArr.concat(CommentArray)); // this also not working
GlobalNews= NewsArr.concat(CommentArray);
答案 0 :(得分:0)
您可以使用feed_data
来连接数组:
reader.read()

$.merge( CommentArray, NewsArray );