Skip to content

对象

一份参考文档,列出了支持对象表达式中的数据转换的内置便利函数。

表达式中的 JavaScript

您可以在表达式中使用任何 JavaScript。有关更多信息,请参阅表达式

isEmpty(): 布尔值

Checks if the Object has no key-value pairs.

合并(对象:对象):对象

Merges two Objects into a single Object using the first as the base Object. If a key exists in both Objects, the key in the base Object takes precedence.

函数参数

objectRequiredObject

与基础对象合并的对象。


hasField(fieldName:字符串):布尔值

Checks if the Object has a given field. Only top-level keys are supported.

函数参数

fieldNameRequiredString

要搜索的字段。


removeField(键:字符串):对象

Removes a given field from the Object

函数参数

keyRequiredString

要删除的字段的字段键。


removeFieldsContaining(值:字符串):对象

Removes fields with a given value from the Object.

函数参数

valueRequiredString

要删除的字段的字段值。


keepFieldsContaining(值:字符串):对象

Removes fields that do not match the given value from the Object.

函数参数

valueRequiredString

要保留的字段的字段值。


紧凑():对象

Removes empty values from an Object.

toJsonString(): 字符串

Convert an object to a JSON string. Equivalent of JSON.stringify.

urlEncode(): 字符串

Transforms an Object into a URL parameter list. Only top-level keys are supported.