PHP
5
Вклад в тег
$arr = [['name' => 'ford', 'count' => 2],
['name' => 'ford', 'count' => 8],
['name' => 'lada', 'count' => 9],
['name' => 'lada', 'count' => 2]];
$result = [];
foreach($arr as $car) {
if (!isset($result[$car['name']]) || $result[$car['name']] < $car['count']) {
$result[$car['name']] = $car['count'];
}
}