Each() mising first row from table source

Each() mising first row from table source

cipraencipraen Posts: 4Questions: 3Answers: 0
edited April 2016 in Free community support

Any idea why the first row of data from the source table is always skipped when iterating?

var tableSource= $('#tableSource').DataTable();

tableSource
            .column( 2 )
            .data()
            .each( function ( value, index ) {
                //console.log( 'Data in index: '+index+' is: '+value );
                $('#tableTarget > tbody > tr:nth-child('+index+')').append('<td>'+value+'</td>');
            });

The tableSource is already a datatable. What I'm trying to do is copy a column from tableSource to the tableTarget, but everytime the code runs the first row from the tableSource is skipped.

Answers

This discussion has been closed.