VALUE

VALUE converts numbers in string format into numbers.

Function category: Text

Syntax

VALUE(arg1)

Arguments

Description

arg1

String of a recognizable number.

Example

Let's say we receive the following response that includes driving data for driver_1 and driver_2.

{
"data":{
"driver_stats":{
"driver_1":{
"avg_mpg":"18",
"top_mpg":"22"
},
"driver_2":{
"avg_mpg":"16",
"top_mpg":"20"
}
}
}
}

If we'd like to convert some of the mileage data to a numerical value, use the following function.

# Convert mileage string to a number
VALUE(data.driver_stats.driver_1.avg_mpg)
# Returns 18