[Solved] Ajax array showing comma (,) in IE [closed]


var obj = jQuery.parseJSON( lines );

this will produce an array.

... .append( obj + '<tr ...

this will convert the array to string that looks very much like this: '...</tr>,<tr ...' before appending your new row.

If you want to concatenate the elements of the string client-side (why not do it server-side?), you can use the array method join:

... .append( obj.join('') + '<tr ...

solved Ajax array showing comma (,) in IE [closed]