Manipulation
Last updated
Last updated
Creates an array of a certain size with a default value.
Creates an array of a certain size with a default value and a list of keys.
Applies the first value that is not empty (0, null, "", empty string)
Useful if you need to determine a value to apply based on what is provided, such as editing a database record and being uncertain if an input will be provided to replace a value.
Applies the first value that is not null
Useful if you need to determine a value to apply based on what is provided, such as editing a database record and being uncertain if an input will be provided to replace a value.
Gets a piece o data at a specified path, and returns a default value if it is not defined.
As an example, let's use the following object, stored in a variable called author
We can see that this author does not have a defined genre, but maybe we are searching for books that are in the same genre this author writes.
If we try and retrieve the genre, we will encounter an error.
Instead, we can use the Get filter to specify a default value to work with.
Similar to get, this checks if a value is present, but only returns a true or false
Use set to set a value at a specific location inside of an object.
Use set_conditional to set a new value in an object based on whether a condition evaluates as true.