INC

INC increments the value of a number by 1, returning a float. For non-numeric types, INC will throw an error.

Function category: Statistical

Syntax

INC(arg1)

Arguments

Description

arg1

Either an integer, float or fraction.

Examples

Example 1:

Let's say we're given the following response with some driver performance ratings:

{
"data":{
"driver_performance_ratings":
[
-0.6,
-0.1,
2,
3/4
]
}
}

If we wanted to iterate over the list and increment each rating by 1, we could pass INC to MAP:

MAP(INC, data.driver_performance_ratings)

This returns the following:

[0.4,0.9,3,1.75]