Using a custom DMX Formatter would be the best solution right now. Although this would make for a good addition I suppose.
You will have to create a formatter, say whereNotInArray, and use JS to filter and return the list.
dmx.Formatter('array', 'whereNotInArray', function (val, propertyName, arrayValues) {
if (arrayValues == null || arrayValues.length == 0)
return null;
if (propertyName == null)
throw Error("Incorrect parameters.");
var returnVal = [];
for (var i = 0; i < val.length; i += 1) {
var isInArray = false;
for (var j = 0; j < arrayValues.length; j += 1) {
if (val[i][propertyName] == arrayValues[j]) {
isInArray = true;
break;
}
}
if (!isInArray)
returnVal.push(val[i]);
}
return returnVal;
});
Call it like so:
getProgList.data.getProgs.whereNotInArray('programme_id', arrProgrammesSelected.items)
Haven't tested the JS. So please debug if any issues. Run this script after page load has completed.
More on client-side & server-side custom formatters/modules: