private function getFieldValue($object, Field $field)
    {
        if (is_array($object)) {
            $path = '[' . $field->getName() . ']';
        } else {
            $path = $field->getName();
        }

        return $this->accessor->getValue($object, $path);
    }