has_child
Synopsis
@has_child(Expression) -> Boolean
Description
Checks if the object has a direct child matching the provided logical expression.
info
Available in Contextal Platform 1.0 and later.
Parameters
A logical expression, which should match for the child object.
Return value
Boolean: true
if there exists a child object matching the logical expression, false
otherwise.
Examples
@has_child(object_type == "Image")
- This matches all objects, which have a child object of
Image
type.
object_type == "PE" &&
@has_child(object_type == "ZIP" &&
@has_child(object_type == "Text" &&
@match_object_meta($natural_language_profanity_count > 0)
)
)