function relativeComplement(a, b) {
    var b_names = b.map(function(el) {
        return el.name
    })
    var final = []
    a.forEach(function(el, index) {
        if (b_names.indexOf(el.name) == -1) {
            final.push(el)
        }
    })
    return final
}
// Return items which are in list a but not b
Return items which are in list a but not b
Return items which are in list a but not b
function relativeComplement(a, b) {
    var b_names = b.map(function(el) {
        return el.name
    })
    var final = []
    a.forEach(function(el, index) {
        if (b_names.indexOf(el.name) == -1) {
            final.push(el)
        }
    })
    return final
}
function relativeComplement ( a , b ) { var b_names = b . map ( function ( el ) { return el . name } ) var final = [ ] a . forEach ( function ( el , index ) { if ( b_names . indexOf ( el . name ) == - 1 ) { final . push ( el ) } } ) return final }
Return items which are in list a but not b
Return items which are in list a but not b