how to remove duplicate attribute value entities from the design
Hi Team,
I would like to skip the entity.Id if its attribute (entity.offerId) has already been shown in the recommendations. I am trying to use velocity logic but this is not running as expected:
The design :
#set($uniqueEntities=[])
#foreach($e in $entities)
#if($foreach.index <=12)
#if($uniqueEntities != ($e.offerId))
#set($uniqueEntities=$e.offerId)
#end
$uniqueEntities,
#set($foreach.index = $foreach.index + 1)
#end
#end
Response in request :
