Skip to main content

match_object_meta

Synopsis

@match_object_meta(MetadataKey LogicalExpression) -> Boolean

@match_object_meta(MetadataKey InnerFunction) -> Boolean

Description

Checks if the object's metadata entry matches the provided condition.

info

Available in Contextal Platform 1.0 and later.

Parameters

The first argument is always the object's metadata key name, which is followed by a logical expression or an inner function regex/iregex/starts_with, if the key's value is of type String.

Return value

Boolean: true if the metadata key exists and its value matches the condition, false otherwise.

Examples

@match_object_meta($natural_language == "English")
  • This matches an object, which has a metadata key natural_language and its value is "English"
@match_object_meta($number_of_words > 200)
  • This matches an object, which has a metadata key number_of_words and its value is bigger than 200.
@match_object_meta($url starts_with("https://"))
  • This matches an object, which has a metadata key url and its value starts with the string "https://"