Xano Documentation
  • 👋Welcome to Xano!
  • 🌟Frequently Asked Questions
  • 🔐Security & Compliance (Trust Center)
  • 🙏Feature Requests
  • 💔Known Issues
  • Before You Begin
    • Using These Docs
    • Where should I start?
    • Set Up a Free Xano Account
    • Key Concepts
    • The Development Life Cycle
    • Navigating Xano
    • Plans & Pricing
  • The Database
    • Designing your Database
    • Database Basics
      • Using the Xano Database
      • Field Types
      • Relationships
      • Database Views
      • Export and Sharing
      • Data Sources
    • Migrating your Data
      • Airtable to Xano
      • Supabase to Xano
      • CSV Import & Export
    • Database Performance and Maintenance
      • Storage
      • Indexing
      • Maintenance
      • Schema Versioning
  • 🛠️The Function Stack
    • Building with Visual Development
      • APIs
        • Swagger (OpenAPI Documentation)
      • Custom Functions
        • Async Functions
      • Background Tasks
      • Triggers
      • Middleware
      • Configuring Expressions
      • Working with Data
    • Functions
      • AI Tools
      • Database Requests
        • Query All Records
          • External Filtering Examples
        • Get Record
        • Add Record
        • Edit Record
        • Add or Edit Record
        • Patch Record
        • Delete Record
        • Bulk Operations
        • Database Transaction
        • External Database Query
        • Direct Database Query
        • Get Database Schema
      • Data Manipulation
        • Create Variable
        • Update Variable
        • Conditional
        • Switch
        • Loops
        • Math
        • Arrays
        • Objects
        • Text
      • Security
      • APIs & Lambdas
        • Realtime Functions
        • External API Request
        • Lambda Functions
      • Data Caching (Redis)
      • Custom Functions
      • Utility Functions
      • File Storage
      • Cloud Services
    • Filters
      • Manipulation
      • Math
      • Timestamp
      • Text
      • Array
      • Transform
      • Conversion
      • Comparison
      • Security
    • Data Types
      • Text
      • Expression
      • Array
      • Object
      • Integer
      • Decimal
      • Boolean
      • Timestamp
      • Null
    • Environment Variables
    • Additional Features
      • Response Caching
  • Testing and Debugging
    • Testing and Debugging Function Stacks
    • Unit Tests
    • Test Suites
  • CI/CD
  • File Storage
    • File Storage in Xano
    • Private File Storage
  • Realtime
    • Realtime in Xano
    • Channel Permissions
    • Realtime in Webflow
  • Maintenance, Monitoring, and Logging
    • Statement Explorer
    • Request History
    • Instance Dashboard
      • Memory Usage
  • Building Backend Features
    • User Authentication & User Data
      • Separating User Data
      • Restricting Access (RBAC)
      • OAuth (SSO)
    • Webhooks
    • Messaging
    • Emails
    • Custom Report Generation
    • Fuzzy Search
    • Chatbots
  • Xano Features
    • Snippets
    • Instance Settings
      • Release Track Preferences
      • Static IP (Outgoing)
      • Change Server Region
      • Direct Database Connector
      • Backup and Restore
      • Security Policy
    • Advanced Back-end Features
      • Xano Link
      • Developer API (Deprecated)
    • Metadata API
      • Master Metadata API
      • Tables and Schema
      • Content
      • Search
      • File
      • Request History
      • Workspace Import and Export
      • Token Scopes Reference
  • Xano AI
    • Building a Backend Using AI
    • Get Started Assistant
    • AI Database Assistant
    • AI Lambda Assistant
    • AI SQL Assistant
    • API Request Assistant
    • Template Engine
    • Streaming APIs
  • AI Tools
    • MCP Servers
      • Connecting Clients
      • MCP Functions
  • Xano Transform
    • Using Xano Transform
  • Xano Actions
    • What are Actions?
    • Browse Actions
  • Team Collaboration
    • Realtime Collaboration
    • Managing Team Members
    • Branching & Merging
    • Role-based Access Control (RBAC)
  • Agencies
    • Xano for Agencies
    • Agency Features
      • Agency Dashboard
      • Client Invite
      • Transfer Ownership
      • Agency Profile
      • Commission
      • Private Marketplace
  • Enterprise
    • Xano for Enterprise
    • Enterprise Features
      • Microservices
      • Tenant Center
      • Compliance Center
      • Security Policy
      • Instance Activity
      • Deployment
      • RBAC (Role-based Access Control)
      • Xano Link
  • Your Xano Account
    • Account Page
    • Billing
    • Referrals & Commissions
  • Troubleshooting & Support
    • Error Reference
    • Troubleshooting Performance
      • When a single workflow feels slow
      • When everything feels slow
      • RAM Usage
      • Function Stack Performance
    • Getting Help
      • Granting Access
      • Community Code of Conduct
      • Community Content Modification Policy
  • Special Pricing
    • Students & Education
    • Non-Profits
  • Security
    • Best Practices
Powered by GitBook
On this page
  • fill
  • Examples
  • fill_keys
  • Examples
  • first_notempty
  • Examples
  • first_notnull
  • Examples
  • get
  • Examples
  • has
  • Examples
  • set
  • Examples
  • set_conditional
  • Examples
  • set_ifnotempty
  • set_ifnotnull
  • Examples
  • transform
  • Examples
  • unset
  • Examples

Was this helpful?

  1. The Function Stack
  2. Filters

Manipulation

Last updated 2 months ago

Was this helpful?

fill

Create an array of a certain size with a default value.

Parameter
Purpose
Example

parent value

The default value to fill

"default value"

start

The starting index of the array

0

length

The number of items in the array

10

Examples

Example
Result


fill_keys

Creates an object of a certain size with a default value and a list of keys.

Parameter
Purpose
Example

parent value

The default value to fill

"default value"

keys

The array of keys to use

Examples

Example
Output


first_notempty

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.

Parameter
Purpose
Example

parent value

The value to check if empty

Can contain any value, or no value.

value

The value to use if the parent value is empty

"default"

Examples


first_notnull

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.

Hint

Remember, null is its own value entirely. It is not the same as "null", an empty string, or any other similar empty state.

Parameter
Purpose
Example

parent value

The value to check if null

Can be any value

value

The value to use if the parent value is null

"default"

Examples


get

Gets a value at the specified path inside of an array or object.

For arrays, the path can be an index, such as 0, 1, or 2, which will get the specific item at that index in the array.

For arrays of objects, you can specify the index + a path, such as 2.name

For single objects, you can just specify the path, such as name.

This filter is useful if you aren't sure if the value you need will exist, and need to provide a default value in place of it.

Hint

Are you getting errors in your function stacks because certain values don't exist all the time? The GET filter can be a great fix for this.

Parameter
Purpose
Example

parent value

The object or array to search for the value

path

The path to look for inside of the parent value

For getting a specific array item: 0 For getting a specific path inside of an object: pathName For getting a specific path inside of an array of objects: 0.pathName

default value

The value to provide in place of the value that isn't found

This value can be whatever you'd like.

Examples


has

Checks if a value is present (similar to get), but only returns a true or false.

Parameter
Purpose
Example

parent value

The object or array to search for the value

path

The path to look for inside of the parent value

For getting a specific array item: 0 For getting a specific path inside of an object: pathName For getting a specific path inside of an array of objects: 0.pathName

Examples


set

Replaces or inserts new data at a specified path.

Parameter
Purpose

parent value

The object or array to target with the set filter

path

The path at which to insert the supplied value

value

The supplied value to use

Examples


set_conditional

Use set_conditional to set a new value in an object based on whether a condition evaluates as true.

Parameter
Purpose

parent value

The data to insert the result, such as an object

path

The path to insert the result

value

The value to insert at the specified path

conditional

The condition to check. This can either come from an earlier function,or another filter that returns a true or false

Examples


set_ifnotempty

set_ifnotnull

Sets a new value in an object if the value provided is not empty. An empty value can be 0, null, or an empty string.

set_ifnotnull works the same, but only checks for null

Parameter
Purpose
Example

parent value

Where to set the value

This will usually be an existing object

path

The path to set the value if the checked value exists

"name" "age" "location"

value

The value to set if the checked value is not empty (or null)

Any value

Examples

1

First, we're getting an existing record from the database.

In this function stack, we're simulating a user submitting changes to their user profile.

2

Then, we use an Update Variable with set_ifnotempty (or set_ifnotnull) to determine whether or not the returned record needs to be updated.

3

Finally, we edit the record using the result of step 2 for all of our values.


transform

Hint

You can use the context variable $$ to target the parent value.

Parameter
Purpose
Example

parent value

The value to apply the transformation to

Can be any value or variable

expression

The expression to run

Any expression

Read more about expressions and Xano Transform below.

Examples

[1,2,3]|transform:($$|count)                              // returns 3
[1,2,3]|transform:($$|count)+($$|sum)                     // returns 9
{first:Alpha,last:Beta}|transform:$$.first~" "~$$.last    // returns Alpha Beta

unset

Removes a key from an object

Parameter
Purpose

parent value

The object to target

path

The name of the key to remove from the object

Examples


This can be an object, array, a variable, or the result of one of the Get All Input functions

This can be an object, array, a variable, or the result of one of the Get All Input functions

The transform filter is universal way to transform data. It works with arrays, objects, and scalar values. It uses the to specify the transformation.

This filter is similar to the , except it can bind to all data - not just an array.

🛠️
[
     "Default Value",
     "Default Value",
     "Default Value",
     "Default Value",
     "Default Value",
     "Default Value",
     "Default Value",
     "Default Value",
     "Default Value",
     "Default Value"
]
[
	"key1",
	"key2",
	"key3"
]
{
	"key1": "Default Value",
	"key2": "Default Value",
	"key3": "Default Value"
}
expression data type
Expression
Xano Transform
map filter
[1]
[2]
[1]
[2]
An age is provided in the input, so it is provided by the GET filter.
No age is provided in the input, so the default value is used instead.
An age is provided, so the filter returns true
An age is not provided, so the filter returns false
Replace a value with another
Set a new key inside of an object
The age provided is greater than 20, so we return the value set in our set_conditional filter
The user record normally returns a "name", but using unset has removed it.

NOTE

When a filter below refers to the parent value, we're talking about the value box that lives immediately above the filter.