相关疑难解决方法(0)

在Google Apps脚本中迭代对象

我以为我的问题会用这个或者这个回答,但我也不是要找的.

我在Google Script中有一个对象,并希望迭代每个元素:

var dict = {
    "foo": "a",
    "bar": "b"
};

for each key, element in dict{
    print the key and the element
}
Run Code Online (Sandbox Code Playgroud)

这可能吗?

javascript google-apps-script

5
推荐指数
2
解决办法
2万
查看次数

标签 统计

google-apps-script ×1

javascript ×1