filter(["Apple", "Avocado", "Cherry"], current.substring(0,1).equal("A"))
-
Let’s say you have a list of text. The condition extracts the first letter using .substring(0, 1) and checks if it is equal to “A” by .equal("A"). The resulting list will include only those items that meet this criterion.