Sreekanth Reddy

Sreekanth Reddy

  • 334
  • 4.8k
  • 421.4k

html table to array

Jun 19 2015 7:27 AM
Hai friends,
I am retrieving the data from html table to an array in jquery.
I had used the following code.
 
$("#crt").live("click", function () {
var arr = [];
$("#tblcomponent tbody tr").each(function (i) {
debugger;
var value = $(this).find("td").text();
arr.push($(this).find("td").text());
});
});
 
I am getting the output of a row as
1hari2500
i need it as           1,hari,2500
 
please help me. 

Answers (3)