JSFiddle - React, Tailwind, and code Playground

HTML

<script src="http://underscorejs.org/underscore-min.js"></script>

JavaScript

var result = [
    {
        attributes: {
            im_category: "one"
        }
    },
    {
        attributes: {
            im_category: "two"
        }        
    },
    {
        attributes: {
            im_category: "one"
        }        
    }
    ];
console.log(result);
console.log(_.groupBy(result, function (item) { return item.attributes.im_category; }));