- Get link
- X
- Other Apps
labels
Array containing objects for each of the labels.
labels is a member of the Labels dictionary.
labels has data type array
A collection of data values.Metadata
Metadata are implicit properties belonging to a data type. If your data has the name 'foo', you reference it with 'data:foo'. If the metadata is 'bar', you can reference the value of foo's metadata bar with 'data:foo.bar'.length: Provides the number of entries in the array.
size: Same as length.
last: The last item in the array.
first: The first item in the array.
empty: Whether the array has no items.
notEmpty: Whether the array has at least one items.
any: same as notEmpty.
Operators
The following operators apply to the array data type.array contains
item
Returns a boolean which is true if the given array contains the given item.Example usage:
<b:if cond='[123, 456] contains data:post.id' /> [Special markup] </b:if>
array take
number
(Also supported with the syntax limit
)
Returns an array limited to
number
of the given array's items.
array skip
number
(Also supported with the syntax offset
)
Returns an array of the remaining items after skipping
number
of the given array's items.
lambda operators
Lambda operators are operators which apply a given function or condition to each item in an array.They are applied using the syntax
array [lambda operation] (x => [function involving x])
Where:
x
can be any variable name you like.lambda operation
is an operation from the list below.function involving x
is any expression involving x, where x is a variable representing an item in the array.
Lambda Operations
- any: Returns a boolean for whether any item in the array returns true for the given function.
- all: Returns a boolean for whether all the items in the array returns true for the given function.
- none: Returns a boolean for whether none of the items in the array returns true for the given function.
- count: Returns a number for the count of the items in the array that return true for the given function.
- map: Returns an array of the results for applying the given function to each of the array items.
- filter: Returns an array of the items which return true for the given function.