code: function removeDuplicates(items) {
      var temp = {}, result = [], x, i = items.length;
      while (i--) {
        x = getData(items[i], 'id', true);
        if (!temp.hasOwnProperty(x)) {
          temp[x] = 1;
          result.push(items[i]);
        }
      }
      return result;
    }
docs: Remove duplicates from given array