count
Count all elements in an array.
array(required): the array to count
bash
echo '{"orders": [{"status": "ACTIVE"}, {"status": "CLOSED"}, {"status": "ACTIVE"}]}' \
| utlx -e 'count($input.orders)'
# 3utlx
{
totalOrders: count($input.orders),
totalItems: count($input.items)
}