well, having something like:
$array[0]->id = \'one\'; $array[0]->color = \'white\'; $array[1]->id = \'two\'; $array[1]->color = \'red\'; $array[2
You can use the function array_search of php like this
$key=array_search("one", array_column(json_decode(json_encode($array),TRUE), 'color')); var_dump($array[$key]);