I have an array, containing some strings split by a comma. I would like to count the amount of duplicate strings and set the number to a variable with the name of the item that appears the most. An example array is below:
“Postage”, “Registry”, “Registry”, “Registry”, “Registry”, “Search Fees”, “Registry”, etc.
The strings in the array will differ almost every time, as will the amount in the array, so I cannot look for specific words or locations. Does anybody have any suggestions on counting the duplicate strings?
Thanks in advance