return array_intersect_key($results, array_unique(array_column($results, 'nid')));
$filtered_results = array_combine(array_column($results, 'nid'), $results);