ADF Collection Functions学习

ADF Collection Functions学习

1、contains(用于判断字符串是否包含子字符串)
Returns true if dictionary contains a key, list contains value, or string contains substring. For example, the following expression returns true: contains(‘abacaba’,‘aca’)">Returns true if dictionary contains a key, list contains value, or string contains substring. For example, the following expression returns true: contains(‘abacaba’,‘aca’)

2、empty(判断对象,数组、字符串是否为空)
Returns true if object, array, or string is empty. For example, the following expression returns true: empty(’’)

3、first(返回传入的数组或字符串的第一个元素)
Returns the first element in the array or string passed in. For example, this function returns 0: first([0,2,3])

4、intersection(返回单个数组或对象取交集)
Returns a single array or object with the common elements between the arrays or objects passed to it. For example, this function returns [1, 2]: intersection([1, 2, 3], [101, 2, 1, 10],[6, 8, 1, 2]). The parameters for the function can either be a set of objects or a set of arrays (not a mixture thereof). If there are two objects with the same name, the last object with that name appears in the final object.

5、join(返回一个字符串,该字符串包含数组中的所有项)
Return a string that has all the items from an array and has each character separated by a delimiter.

6、last(返回传入的数组或字符串的最后一个元素)
Returns the last element in the array or string passed in. For example, this function returns 3: last([0,2,3])

7、length(返回数组或字符串中的元素数)
Returns the number of elements in an array or string. For example, the following expression returns 3: length(‘abc’)

8、skip(返回数组中从索引开始的元素,包括索引位置)
Returns the elements in the array starting at index Count, for example this function returns [3, 4]: skip([1, 2 ,3 ,4], 2)

9、take(返回数组中索引位置之前的元素,不包括索引位置的元素)
Returns the first Count elements from the array or string passed in, for example this function returns [1, 2]: take([1, 2, 3, 4], 2)

10、union(返回单个数组或对象取并集,相同对象只取一个)
Returns a single array or object with all of the elements that are in either array or object passed to it. For example, this function returns [1, 2, 3, 10, 101] : union([1, 2, 3], [101, 2, 1, 10]). The parameters for the function can either be a set of objects or a set of arrays (not a mixture thereof). If there are two objects with the same name in the final output, the last object with that name appears in the final object.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值