JSFiddle - React, Tailwind, and code Playground

by asuma igarashi

JavaScript

const list = new Backbone.Collection([{a: 1, b: 2},{a: 2, b: 2},{a: 3, b: 3},{a: 4, b: 3},{a: 5, b: 4}]);

list.each(listItem => {
    const dup = list.filter(item => {
        return item.get('a') !== listItem.get('a') && item.get('b') === listItem.get('b');
    }).;
});