I have a list like
[{
"name":"a",
"val":1
},{
"name":"b",
"val":9
},{
"name":"c",
"val":5
},{
"name":"a",
"val":2
},{
"name":"b",
"val":4
}]

i need an output like :
[{
"name":"a",
"val":3
},{
"name":"b",
"val":13
},{
"name":"c",
"val":5
}]

Using java 8 streams.