Created
September 5, 2018 20:54
-
-
Save juanbrusco/219105c2bb146e61313c9a60a968be93 to your computer and use it in GitHub Desktop.
Detect duplicates into list - Freemarker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<#assign newList = [] /> | |
<#list response.data.items as originalList> | |
<#if ! newList?seq_contains(originalList.xValue)> | |
<#assign newList = newList + [originalList.xValue] /> | |
</#if> | |
</#list> |
Thank you! This is working for me.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Check this: https://stackoverflow.com/questions/51738960/how-to-remove-duplicate-elements-in-a-array-using-freemarker