Syntax
TALLY(array, [strict_types: FALSE])
Usage examples
Example 1
Input | 1 { 2 "my_action": { 3 "message": [ 4 "dog", 5 "dog", 6 "cat", 7 "cat", 8 "cat", 9 "fish" 10 ] 11 } 12 } |
Formula | TALLY(my_action.message) |
Output | 1 { 2 "dog": 2, 3 "cat": 3, 4 "fish": 1 5 } |
Example 2
Input | 1 { 2 "my_action": { 3 "message": [ 4 404, 5 404, 6 "404", 7 505, 8 "505" 9 ] 10 } 11 } |
Formula | TALLY(my_action.message, strict_types: TRUE) |
Output | 1 [ 2 { 3 "key": 404, 4 "count": 2 5 }, 6 { 7 "key": "404", 8 "count": 1 9 }, 10 { 11 "key": 505, 12 "count": 1 13 }, 14 { 15 "key": "505", 16 "count": 1 17 } 18 ] |