After one month of successful mapping our template gives different results with no change in the process. Xml fragment is as follows:
<Authorisation>
<Application>
</Application>
<Role>Role on</Role>
<Role>Role two</Role>
</Authorisation>
and the mapping:
"roles":[
{% JSONArrayFor userRole in authorisation where Role-%}
{
"role":"{{userRole}}"
}
{% endJSONArrayFor -%}
]
The Logic App used to produce proper json collection but now, all of the sudden the collection is empty.
I can see that authorisation.Role produces just first item "Role one" and autorisation.Role.size gives 11. For loop instead of JSONArrayFor read "role one" char by char.It all means that mapping only reads first role element - there is no collection
The problem is only for Xml simple type (just xml element with string value). We process complex types in the same manner and it is still ok.
Is something internal in Azure LogicApps that has changed the mapping process last month?
It was a bug in MS and has been fixed