Skip to main content

count_children

Synopsis

@count_children([Expression]) -> Integer

Description

Counts the number of children objects; optionally those matching the provided logical expression.

info

Available in Contextal Platform 1.0 and later.

Parameters

If no arguments are provided, all children objects will be counted. If a logical expression is provided, only children matching the expression will be counted.

Return value

Integer: number of children objects (meeting the criteria).

Examples

@count_children() > 5
  • This matches all objects, which have more than 5 children.
object_type == "ZIP" && @count_children(object_type == "PE") == 2
  • This matches ZIP objects, which contain exactly two PE objects.