Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
OBJECT
[go: Go Back, main page]

OBJECT

Syntax

=OBJECT(key1, value1, key2, value2, ...)

=OBJECT(keyvalues)

Arguments

ArgumentTypeDescription
keyNStringThe key for the key-value pair. If the key is a non-string it will be converted to a string type
valueNAnyThe value for the specified key. Values can be different types
keyvaluesArrayAn array of key-value pairs. Each element in the array should be an array with two values, the first representing the key and the second representing the value.

Examples

=OBJECT("A", 2){"A": 1}
Creates an object consisting of the key "A" which maps to the value 1

=OBJECT("A", 1, "B", 2){"A": 1, "B": 2}
Creates an object consisting of the key "A" which maps to the value 1, and the key "B" which maps to the value 2.

=OBJECT(ARRAY("A", 1), ARRAY("B", 2)){"A": 1, "B": 2}
Creates an object consisting of the key "A" which maps to the value 1, and the key "B" which maps to the value 2