• ⚠️ Important: This forum is being discontinued.

    We've moved community discussion to a new platform — better search, faster replies, and tighter integration with the Pabbly apps you already use.

    • Sunset date: 23 July 2026 (this forum will go offline after that)
    • Until then: Login remains available for 30 days
    • Continue the conversation: https://sales.pabbly.com/forum

How to use numeric() prefix in JSON.

Status
Not open for further replies.

What is numeric() prefix​


The numeric() prefix is an advanced built-in function that is used to convert a value mapped inside it into a numerical format. This prefix is commonly used in request JSON when certain values such as age and zip code need to be converted to numerical format.

For instance, consider the following example:
JSON:
{
  "name": "John",
  "age": "numeric({{age}})",
  "address": {
    "street": "123 Main St",
    "city": "Anytown",
    "zipcode": "numeric({{zipcode}})"
  }
}

In this JSON, the age and zip code are enclosed in the numeric() prefix to convert them to numerical format.

When a user fills in the age and zip code values in the workflow page or maps them from a previous step, the values are returned in numerical format, as shown below:
JSON:
{
  "name": "",
  "age": 23,
  "address": {
    "street": "ferwr"
    "zipcode": 462016
  }
}

Using the numeric() prefix can ensure that certain values are always returned in numerical format.

How to Use nemric() prefix:

In the given example API endpoint requires the value of age and zipcode in number format. So I'll map age and zipcode inside numeric() prefix like this -
1683265974237.png


In the workflow page when the user will fill age and zip code value or map from previous step -
1683266537021.png


I'll get age and zipcode in the number format like this -
1683266608143.png
 
Last edited by a moderator:
Status
Not open for further replies.
Top