In the following code I am trying to access a collection with a single member. The foreach works as described but I am unable to access items in the collection by index.
#set($customFields = $customFieldManager.getCustomFieldObjectsByName("Property"))
$customFields[0].name
#if(!$customFields.empty)
#foreach($customField in $customFields)
$customField.name
#end
#end
Prints
[Property][0].name
Property
What am I not understanding?