对象#
参考文档,列出了支持表达式中对象数据转换的内置便利函数。
表达式中的JavaScript
你可以在表达式中使用任何JavaScript。更多信息请参阅表达式。
isEmpty(): Boolean #
Checks if the Object has no key-value pairs.
merge(object: Object): Object #
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.
Function parameters#
objectRequiredObject
The Object to merge with the base Object.
hasField(fieldName: String): Boolean #
Checks if the Object has a given field. Only top-level keys are supported.
Function parameters#
fieldNameRequiredString
The field to search for.
removeField(key: String): Object #
Removes a given field from the Object
Function parameters#
keyRequiredString
The field key of the field to remove.
removeFieldsContaining(value: String): Object #
Removes fields with a given value from the Object.
Function parameters#
valueRequiredString
The field value of the field to remove.
keepFieldsContaining(value: String): Object #
Removes fields that do not match the given value from the Object.
Function parameters#
valueRequiredString
The field value of the field to keep.
compact(): Object #
Removes empty values from an Object.
toJsonString(): String #
Convert an object to a JSON string. Equivalent of
JSON.stringify
.
urlEncode(): String #
Transforms an Object into a URL parameter list. Only top-level keys are supported.
此页面是否
微信
🚀 与作者交流
关注公众号

n8n实战笔记
📚 教程 💡 案例 🔧 技巧
📚 教程 💡 案例 🔧 技巧
添加微信

1对1 专业指导
⚡ 快答 🎯 定制 🚀 支持
⚡ 快答 🎯 定制 🚀 支持