I’m trying to display only the duplicate value in an array which just holds names.
So for instance, 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 theortically when I do s-t it should give me the duplicate value which in this case is UK01USV005, however the results I get is an empty array which obviously looks like this: [].
Any ideas why that could be?
should work fine.