lets say I had a word "Appian"
now I need to covert into a list
expecting a result like below( Letter - (Number of times that particular letter is being repeated in the given word))
A-2
p-2
i-1
n-1
Please let me know logic to achieve this
Discussion posts and replies are publicly visible
Try something like this.
a!localVariables( local!input: "Appian", local!inputChars: char(code(local!input)), local!uniqueInputChars: union(local!inputChars, local!inputChars), a!forEach( local!uniqueInputChars, a!map( inputChar: fv!item, count: length( wherecontains(fv!item, local!inputChars) ) ) ) )