Skip to content
This repository has been archived by the owner on Oct 7, 2024. It is now read-only.

JSON.DECODE

Kirill Chernyshov edited this page Mar 13, 2019 · 1 revision

The JSON.DECODE Function

Function Group: Json

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

Syntax

JSON.DECODE(arg1)

  • arg1 is a string

Uses

Let's say we receive some vehicle information like that shown below:

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

If we want to decode that user token into human-readable information, we can use JSON.DECODE:

JSON.DECODE(data.vehicle)

This will return { "model": "prototype", "serial_numbers": [1, 2, 3] }.

Notes

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

Clone this wiki locally