return config.root().get(fieldName);
} else if (!config.hasPath(fieldName)) {
return null;
} else if (field.isArray()) { // check CodableFieldInfo instead of expectedType
ConfigValue configValue = config.root().get(fieldName);
if ((configValue.valueType() != ConfigValueType.LIST) &&
field.autoArrayEnabled()) {
Object singleArrayValue = hydrateFieldComponent(expectedType, fieldName, config);
Object wrappingArray = Array.newInstance(expectedType, 1);
Array.set(wrappingArray, 0, singleArrayValue);
return wrappingArray;