$sharePrice = $this->sharePrice; $sharePrice = $dataObject->getFinancials()->filter(function($element){ if ($element->getKey() == "sharePrice") { return $element; } });