Push Unique Values to an Array
How to Push Unique Values to an Array
data.d.results is the given array and it will push only unique column values to an array.
$.each(data.d.results, function(key, value) {
if ($.inArray(value.Title, UnArr) === -1) {
UnArr .push(value.Title);
}
});
The output UnArr [] Array will have only unique values now.
Comments
Post a Comment