public function pluck($fieldName)
{
// use native php function if field without subdocument
if (false === strpos($fieldName, '.') && function_exists('array_column')) {
if ($this->isResultAsArray()) {
$result = $this->findAll();
} else {
$cursor = clone $this;
$result = $cursor->asArray()->findAll();
unset($cursor);
}
return array_column($result, $fieldName, '_id');
}
// if field with subdocument or native php function not exists
return $this->pluckDotNoteted($fieldName);
}