Hi Snaplogic professionals,
i have question how to design pipeline/condition properly. Lets say i would like to extract ‘Id’ of ‘Branch’, only if ‘Ident’ of current branch is “Capital”
iam able to get all ‘Idents’ in array - but is there a way how to solve it in one mapper?
<Business> <Branch> <Id>12345</Id> <City> <Ident>Capital<Ident> </City> </Branch> <Branch> <Id>44434</Id> <City> <Ident>NotCapital<Ident> </City> </Branch> </Business>
so from xml snippet above, i would like to extract only 12345. now this value is on first position(zero index), but in another example it can be on 3rd, 4th position.
Does exist something like if
<Ident> on [*] as current position == 'Capital' ? <id>[*] : '' but not only for first but looping through all branches in xml?