for (var i = 0; i < dataSets.length; i++) {
        var result = _.filter(data, function(item){
          return _.contains(item, dataSets[i]);
        });
        var collection = []
        for(x in result)collection.push(result[x].value);
    }
When I do a console.log(collection) inside the method, I can see 3 arrays, which is correct.
[431, 552, 318, 332, 185]
[17230, 17658, 15624, 16696, 9276]
[5323, 6359, 8216, 9655, 5513]
However outside of the method I can only get the last value.
[5323, 6359, 8216, 9655, 5513]
Is there a way I can return all the values outside of the method?
 
    