JSON.DECODE

JSON.DECODE returns the decoded contents of a JSON encoded string.

Function category: JSON

To perform the opposite operation, JSON encoding a given string, use JSON.ENCODE

Syntax

JSON.DECODE(arg1)

Arguments

Description

arg1

A string.

Example

Let's say we receive the following vehicle information.

{
"data": {
"vehicle": {
"vehicle": "prototype",
"serial_numbers": [
"1",
"2",
"3"
]
}
}
}

If we want to decode that user token into human-readable information, use the following function.

JSON.DECODE(data.vehicle)

This returns the following:

{
"model": "prototype",
"serial_numbers": [
"1",
"2",
"3"
]
}