I am trying to display only the duplicate value in an array that just contains the names.
So for example, my code is:
<%= s= arrayOfStuff %> <%= t= arrayOfStuff.uniq %>
which displays
["UK01USV005", "NJ08APP516", "NJ08MHF001", "UK01USV505", "NY01MHF0006", "UK01USV525", "UK01USV005", "NJ08APP515", "NJ08MHF002"] ["UK01USV005", "NJ08APP516", "NJ08MHF001", "UK01USV505", "NY01MHF0006", "UK01USV525", "NJ08APP515", "NJ08MHF002"]
so when I do st , it should give me a duplicate value, which in this case is equal to UK01USV005 , however the results that I get are an empty array that looks like this: [] .
Any ideas why this could be?
source share