I have an array and I want to fill it with strings taken from specific XML nodes, like in this pseudocode example:
let $array := array {}
for $child in $collection
where contains(data($child), "Hey")
do $array := array:append($array, data($child))
How would correct code look like to perform such an operation?
So if I have this XML
<root>
<child>Hey</child>
<child>Ho</child>
<child>Hey Ho</child>
</root>
I expect the array to be
array ["Hey", "Hey Ho"]