json to list()

Prev Next

This function can convert a JSON string into a list.

However, only elements/structures of the JSON string are transferred to the list if they can be clearly mapped there. Note: This primarily concerns arrays of simple data types, see first example.

If the function is successful, the return value is true, otherwise it is false (e.g. if an incorrect JSON string was specified in a).

Parameters

Parameter

Description

a

The JSON string.

b

Name of the list.

c

(optional) If true, the list b is emptied beforehand. Default: false.

Examples

Parameter a

Parameter b

Parameter c

Result

[1,2,3]

mylist

true

The values 1, 2 and 3 have been added to the list.

{"a": "hello", "b": [1,2,3]}

mylist

true

No value was added to the list.

{"a": [77,88], "b": [1,2,3]}

mylist

true

No value was added to the list.

{"a": [1,2,3]}

mylist

true

No value was added to the list.