A
A
alex_http2015-06-24 23:42:37
Google Apps Script
alex_http, 2015-06-24 23:42:37

Google Apps Script associative array?

Hello. Can you tell me how to create an associative array in google script? If possible, on a working example.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DevMan, 2015-06-25
@alex_http

Google Apps Script is based on JavaScript.
try:

х = {};
x.key1 = 'zzz';
x.key2 = 'xxx';
x.key3 = 'ccc';

y = {k1: 'x', k2: 'y', k3: 'c'};
y.k4 = y.k1 + y.k3;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question