Please help to figure out how can I group and display JSON objects. Here's my example:
var result = [
{
"data":
[{
"id": 1,
"name": "aaa"
}]
},
{
"data":
[{
"id": 2,
"name": "bbb"
}]
},
{
"data":
[{
"id": 1,
"name": "cccc"
}]
},
{
"data": [{
"id": 3,
"name": "ddd"
}]
},
{
"data": [{
"id": 2,
"name": "eee"
}]
},
{
"data":
[{
"id": 3,
"name": "fff"
}]
}
]
I want to group the name which have the same id using jQuery. Hope you can help me to solve this issue. I would be very thankful for this.
Thank you in advance!