If I want to figure out how much "john" paid and how many people bought $10 product in this data list

Data list:

```
[
{
 "name": "john",
 "payment": 10
},
{
 "name": "john",
 "payment": 25
},
{
 "name": "michel",
 "payment": 10
}
]

```

Should I make two requests? or Is there any method to get this at once?