public function findBy($key, $value) { foreach ($this->data as $item) { if ($this->extractValue($item, $key) == $value) { return $item; } } }