Skip to content

Instantly share code, notes, and snippets.

@ishmaelahmed
ishmaelahmed / arrayScrub.js
Created April 1, 2010 16:21
arrayScrub 2010-04-01 12:27:37 -0400
/* *
* Takes an array of objects and removes duplicate data on an interior poperty,
* and objects that have and empty testing poperty
* @params an array and a object param
* @returns array of unique objects, with no empty property value
* */
arrayScrub = function(array,param) {
var i, x, test, testArray = [array[0]];
for (i = 0; i < array.length; i++) {