WHERE
Takes an array of objects, a path and a value (optional). The path can be a single key or a dot-separated series of keys. Returns a new array containing only the objects where the value at the key/path matches the provided value. If value is not provided, it returns an array containing only the objects where the value at the key/path is present.
If you try to pass NULL in for value, it will be treated as not provided, so you cannot use this function to check for NULL values. Instead, you can use FILTER to find NULL values like so:
FILTER(data, LAMBDA(object, object["key"] = NULL)). To return NULL when path has a value of NULL, set the null_on_path_error parameter to TRUE. null_on_path_error is FALSE by default.
Categories: Arrays, Objects
Syntax
Examples
Example 1
Input
Formula
Output
Example 2
Input
Formula
Output
Example 3: If 'value' isn't provided, return all objects where the path exists and the value at that path IS_PRESENT.
Input
Formula
Output
Example 4: If 'path' is provided NULL and 'null_on_path_error' is provided TRUE, return NULL.
Input
Formula
Output
Sample actions
Select an action to inspect
You can also click "Copy actions" and paste them in your Tines story to see how they work.