There is one table , and I want the unique values of table column data, like table row may have 4, 2 , 2, 4,5 , 4. So it should return array like this data = [ 2 , 4 , 5 ]
I am able to achieve this using jquery as below link
http://jsbin.com/ojeroc/5/edit#source
But data should come in ascending order So I can use this array in another function.
$(document).ready(function(){
console.log("document is ready");
var items=[], options=[];
console.log(items);
console.log(options);
//Iterate all td's in second column
$('#dataTable tr td').each( function(){
//console.log("Inside tr data");
//add item to array
items.push( $(this).text() );
// console.log($(this).text());
});
//restrict array to unique items
var items = $.unique( items );
alert(items);
});