Рекомендую к ознакомлению
https://php.net/json_decode
https://php.net/array_column
https://php.net/array_unique
https://php.net/array_intersect_key
https://php.net/array_walk
<?php
$arr = json_decode('[{"id":1,"name":"Ivan","access":true},{"id":2,"name":"Olga","access":false},{"id":1,"name":"Kate","access":false}]
', true);
//удаляем повторы id
$arr = array_intersect_key(
$arr,
array_unique(array_column($arr, 'id' ))
);
//удаляем ключ access
array_walk($arr, function (&$v) {
unset($v['access']);
});
print_r($arr);
Вариант через foreach в один проход
<?php
$arr = json_decode('[{"id":1,"name":"Ivan","access":true},{"id":2,"name":"Olga","access":false},{"id":1,"name":"Kate","access":false}]
', true);
$tmp_arr = [];
foreach($arr as $val)
{
if(isset($tmp_arr[$val['id']]))
{
continue;
}
unset($val['access']);
$tmp_arr[$val['id']] = $val;
}
$arr = array_values($tmp_arr);
print_r($arr);