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]; 

Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -