Find Vowels in a List of Words
Easy
Given a list of words, write an Appian expression that identifies and returns all vowels present in the words.
ri! Rule Inputs
ri!wordsText{
"Apple",
"Sky",
"Orange",
"Fly"
}Example 1 — Case 1
Input: ri!words
{
"Apple",
"Sky",
"Orange",
"Fly"
}Output:
{
{word: "Apple", vowels: {"A", "e"}},
{word: "Sky", vowels: {}},
{word: "Orange", vowels: {"O", "a", "e"}},
{word: "Fly", vowels: {}}
}Example 2 — Case 2
Input: ri!words
{
"Naruto",
"Sasuke",
"Kakashi",
"Obito"
}Output:
{
{word: "Naruto", vowels: {"a", "u", "o"}},
{word: "Sasuke", vowels: {"a", "u", "e"}},
{word: "Kakashi", vowels: {"a", "a", "i"}},
{word: "Obito", vowels: {"O", "i", "o"}}
}Example 3 — Case 3
Input: ri!words
{
"Hello",
"123",
"",
"AEIOU",
"xyz"
}Output:
{
{word: "Hello", vowels: {"e", "o"}},
{word: "123", vowels: {}},
{word: "", vowels: {}},
{word: "AEIOU", vowels: {"A", "E", "I", "O", "U"}},
{word: "xyz", vowels: {}}
}Appian Expression Tips
- • Use
ri!variableNamefor rule inputs - • Use
a!localVariables(local!x: …, body)for locals - • Use
a!forEach(items: …, expression: fv!item)to iterate - • Use
where()/reject(fn!isnull, list)to filter