<script>
	 
    $(function() {

        $('#employees_cat_table').SetEditable({
            $addButton: $('#emp_row_add')
        });

        $('#submit_data').on('click', function() {
            var td = TableToCSV('employees_cat_table', ',');
            console.log(td);
            var ar_lines = td.split("\n");
            var each_data_value = [];
            for (i = 0; i < ar_lines.length; i++) {
                each_data_value[i] = ar_lines[i].split(",");
            }

            for (i = 0; i < each_data_value.length; i++) {
                if (each_data_value[i] > 1) {
                    console.log(each_data_value[i][2]);
                    console.log(each_data_value[i].length);
                }

            }

        });
    });
</script>