Skip to content

TableMaxn

返回数字的最大索引编号。

Lua数组的索引下标是从 1 开始的

业务属性

属性含义说明输入限定示例值
enable是否启用该控件,未启用时不编译是否编译选择值启用
name控件返回值命名控件输出值变量名常量maxIndex
text与控件关联的文本设计页控件显示常量TableMaxn
input输入参数流程变量#{array}

使用示例

输入:#{body.array}

img_10.png

输出控件返回maxIndexdata属性为:

json
{
  "maxIndex": "#{maxIndex}"
}
{
  "maxIndex": "#{maxIndex}"
}
img_11.png

使用curl请求接口:

$ curl http://localhost:6636/api/tableMaxn -d "{ \"array\": [1,2,3,4,5,6] }"
$ curl http://localhost:6636/api/tableMaxn -d "{ \"array\": [1,2,3,4,5,6] }"

接口返回:

json
{
    "maxIndex": 6
}
{
    "maxIndex": 6
}