Skip to content

Dictionary Count

Type: dict-count  ·  Package: Collections Activities v1.0.3  ·  Output: int

Gets how many key-value pairs a dictionary has.

Counts the entries of dict and returns the number. It does not modify the dictionary.

ParameterTypeDefaultDescription
dictDictionary—The dictionary.

None.

Returns an int with the number of entries; 0 if the dictionary is empty.

MessageCause and fix
'dict' must be a Dictionary, got ….dict is not a dictionary (the message shows the type received, or null if the variable is empty).
Dictionary Count dict = totals → output: n
Log message = "There are " + n + " categories"