jquery - Accessing the value of a given cell in a tr array -
i getting rows of fiddle http://jsfiddle.net/qupln/3/ like
var x = $("tr").map(function(i,j){ return $(j).text(); });
i can access item in array like
console.log(x[1]);
console.log(x[1]);
holds data of row interested in.however value of each cell in console.log(x[1]);
how access instance firstname value in x[1];
try this:
var x = $("tr").map(function(i,j){ return $(j).text(); }); var firstname = x[1].split("\n")[2]; var lastname = x[1].split("\n")[3];