Skip to main content
NOTEWhen a filter below refers to the parent value, we’re talking about the value box that lives immediately above the filter.

append

Adds a new element to the end of the array, and return the updated array

count

Returns the number of items in an array

diff / diff_assoc

intsersect / intersect_assoc

These filters are used to compare arrays.
  • diff is used to show values from the first array that are not in the second array
  • intersect is used to show values from the first array that are in the second array
Use the basic filter for value arrays, and the _assoc version for arrays of objects.

filter_empty

Returns a new srray with only entries that are not empty. An empty value can be [], {}, 0, null, "", or false.

first

Get the first entry of an Array.

filter_empty_array

filter_empty_object

filter_empty_text

filter_false

filter_null

filter_zero

These filters are designed to remove the corresponding values from an object or an array. Useful in scenarios where something is sending data to your APIs that you don’t have full control over, such as a frontend platform that always sends empty strings or null values.

flatten

Flattens a multi-level array into a single-level array.

join

Converts an array into a text string by joining each value and using a separator.

last

Get the last entry of an Array.

merge

merge_recursive

Merge two arrays or objects together and return the new item.
  • Use **merge **to merge single level data.
  • Use merge_recursive to merge multi-level data.

pop

Pops the last element of the Array off and returns it.
Please note that Xano’s **pop **filter does NOT remove the item from the array.

prepend

Push an element on to the beginning of an array

push

Push an element on to the end of an array

range

Returns array of values between the specified start/stop.

remove

Remove any elements from the array that match the supplied value and return the new array
Use the path option to search inside of objects. Use the strict option to determine how precise the filter is (for example, treating 100 and “100” the same)

safe_array

Always returns an array. Uses the existing value if it is an array or creates an array of one element.

shift

Shifts the first element off the Array and returns it.

shuffle

Returns the array in a randomized order

slice

Extracts and returns a section of an array
  • offset - what index should the slice start, starting at 0
  • length - how many items to slice

sort

Sort an Array of elements with an optional path inside the element, sort type, and ascending/descending. Sort types include:
  • text - case-sensitive sort for text
  • itext - case-insensitive sort for text
  • number - to sort numerically
  • natural - case-sensitive sort that is alphanumerical and natural to humans
  • inatural - case-insensitive sort that is alphanumerical and natural to humans
Ascending order is performed with a true boolean. Descending order uses a false boolean. The example below shows the difference between case-sensitivity sort with text and itext:
The example below shows how to use the number sort type:
The example below shows using the natural sorting option

unique

Returns unique values of an Array. You can also use this filter with an array of objects by specifying a path to the key you would like to use to judge uniqueness.

unshift

Push an element to the beginning of an Array and return the new Array.

pick/unpick

These filters are meant to be used when dealing with Object field types and are particularly useful if you are receiving a large object, from a webhook for example, where only a few of those records are required for your workflows. You can also use them with an array of objects by specifying a path to the key you would like to make changes to. Pick: Identify values you would like to keep and the filter will return a new object containing only the values you have selected.

Example Object

Defining the Keys we want to include in our new object.

Result

Unpick: Identify values you would like to exclude and the filter will return a new object containing only the fields that weren’t omitted.

Example Object

Defining the Keys we want to exclude from our new object.

Result