Group similar object values into new array underscore

I have data like this :

[{
    "ru":"R401","area":"RFCC","unit":"OFFSITE","tot":1
    }, {
    "ru":"R401","area":"RFCC","unit":"OFFSITE","tot":1
    }, {
    "ru":"R401","area":"RFCC","unit":"OFFSITE","tot":1
    }, {
    "ru":"R401","area":"RFCC","unit":"RCU","tot":1
}]

I want to group the objects 'ru', 'area', 'unit', 'tot' and sum value on 'tot' object then push it into a new array using underscore.js, I've tried, so far but none of them are solved.

And I want the output to be like this :

[{
    "ru":"R401",
    "area":[{
        "RFCC":[{
            "OFFSITE":[{
                "tot":3
            }]
                }, {
            "RCU":[{
                "tot":1
            }]
        }]
    }]
}]

Maybe someone could help me? Thanks in advance.