how to get same id different values in javascript json array object : how to get same id different values in javascript json array object and push it in array.

This is actual json data,
var data = [{
        "areaid": 25,
        "wardid": 5
    },
    {
        "areaid": 24,
        "wardid": 5
    },
    {
        "areaid": 23,
        "wardid": 5
    },
    {
        "areaid": 22,
        "wardid": 5
    },
    {
        "areaid": 21,
        "wardid": 4
    },
    {
        "areaid": 20,
        "wardid": 4
    },
    {
        "areaid": 19,
        "wardid": 4
    },
    {
        "areaid": 18,
        "wardid": 3
    },
    {
        "areaid": 17,
        "wardid": 3
    },
    {
        "areaid": 16,
        "wardid": 3
    }];
	


And the output i want,
for wardid: 3
	[{
        "areaid": 18
    },{
        "areaid": 17
    },{
        "areaid": 16
    }]
for wardid: 4
	[{
        "areaid": 21
    },{
        "areaid": 20
    },{
        "areaid": 19
    }]

