我试图通过连续点击事件获取三行数据。我想将所有数据对象分组到一个json对象。请帮我解决这个问题。
$("#先前教育提交&#34)。单击(函数()
{ var quali = $(" #previous-education option:selected")。text();
var qualification ={
educationType:$("#previous-education option:selected").text(),
institutionName:$("#InstitutionName").val(),
yearofPassing:$("#YearofPassing").val(),
majorSubjects:$("#MajorSubjects").val(),
percentage :$("#Percentage").val(),
boardofStudey:$("#BoardofStudey").val()}
qualification= collectObjects(qualification);
console.log(qualification);
});
// Group JSON Data objects
function collectObjects(qualification){
console.log(qualification);
return qualification.concat(qualification);
}