I am working on this demo. How can I push values of checked rows in JS Array or Object?
var obj=[
{
id : "001",
name : "apple",
category : "fruit",
color : "red"
},
{
id : "002",
name : "melon",
category : "fruit",
color : "green"
},
{
id : "003",
name : "banana",
category : "fruit",
color : "yellow"
}
]
$.each(obj, function (index, item) {
var eachrow = "<tr>"
+ "<td id="+index+"><input type='checkbox'></td>"
+ "<td>" + item["id"] + "</td>"
+ "<td>" + item["name"] + "</td>"
+ "<td>" + item["category"] + "</td>"
+ "<td>" + item["color"] + "</td>"
+ "</tr>";
$('#tbody').append(eachrow);
});