private function valueExist($path, array $haystack)
{
$propertyPath = new PropertyPath($path);
$length = $propertyPath->getLength();
$valueExist = true;
for ($i = 0; $i < $length; ++$i) {
$property = $propertyPath->getElement($i);
$isIndex = $propertyPath->isIndex($i);
$propertyExist = $this->arrayPropertyExists($property, $haystack);
if ($isIndex && !$propertyExist) {
$valueExist = false;
break;
}
}
unset($propertyPath);
return $valueExist;
}