Need to count the occurences of string in an array
userList=["abc@gmail.com","bca@gmail.com","abc@gmail.com"]
Need to get the count of each strings
let userList=["abc@gmail.com","bca@gmail.com","abc@gmail.com"]
Expected : [{"abc@gmail.com":2},{"bca@gmail.com":1}]