I have an array like this:
[Shivam, Shiv, Shantanu, Mayank, Neeraj]
I want to create an array of tuples(key , value) from this array only with key being first character and value being an array of strings:
Like this:
[
(**key**: S , **value**: [Shivam, Shiv, Shantanu]),
(**key**: M , **value**: [Mayank]),
(**key**: N , **value**: [Neeraj])
]
PS: It is not a duplicate to this post Swift array to array of tuples. There OP wants to merge two arrays to create an array of tuples