帮助中心

# getAt-按索引取元素

调用getAt函数按索引获取列表中的值。

最小支持版本:5.0.0

# 接口说明

已通过buildList创建List对象,详情请参见buildList (opens new window)
已通过insert向列表中插入数据,详情请参见insert (opens new window)

# 语法

<List object>.getAt(<index>)
1
<List object>.按索引取元素(<index>)
1

# 函数类型

实例函数

# 请求参数

参数名称 类型 是否必选 默认值 示例值 描述
index Cube.Lang.Number 1 列表索引。

# 返回参数

参数名称 类型 示例值 描述
Result Cube.Object "性别" 列表索引中的值。

# 请求示例

List.buildList().insert(0, "名称").insert(1, "性别").getAt(1)
1
最近更新时间: { "value": "2023-09-12", "effect": true }