findLastIndex
Find the index of the LAST element matching a predicate, or -1 if not found.
array(required): the array to searchpredicate(required): lambda(element) -> boolean
bash
echo '{"items": ["A", "B", "A", "C"]}' | utlx -e 'findLastIndex($input.items, (x) -> x == "A")'
# 2utlx
{
lastActive: findLastIndex($input.users, (u) -> u.active)
}