From: Krzysztof B. <kb...@un...> - 2019-11-12 22:41:22
|
W dniu 12.11.2019 o 15:32, Sander Apweiler pisze: > Hi Krzysztof, > > we have a small issue. We have two different Attributes with > entitlement information. One with our local ones and one with the > information from IdP. We want to combine this information in the output > translation profile. A simple + operator does of course not work with > arrays. Do you have another solution? This is bit verbose, but ensures that the source data structures are not modified. Also I guess there is simpler way to do this in MVEL, but this will work without much thinking on my end :-) Assumes that you are combining attr1 values with attr2 values. combined = new java.util.ArrayList(); combined.addAll(attrs['attr1']); combined.addAll(attrs['attr2']); return combined; Cheers, KB |