RuleGo RuleGo
🏠Home
  • Quick Start
  • Rule Chain
  • Standard Components
  • Extension Components
  • Custom Components
  • Visualization
  • RuleGo-Server
  • RuleGo-MCP-Server
  • AOP
  • Trigger
  • Advanced Topics
  • Performance
  • Standard Components
  • Extension Components
  • Custom Components
  • Components Marketplace
  • Overview
  • Quick Start
  • Routing
  • DSL
  • API
  • Options
  • Components
🔥Editor (opens new window)
  • RuleGo Editor (opens new window)
  • RuleGo Server (opens new window)
  • Github (opens new window)
  • Gitee (opens new window)
  • Changelog (opens new window)
  • English
  • 简体中文
🏠Home
  • Quick Start
  • Rule Chain
  • Standard Components
  • Extension Components
  • Custom Components
  • Visualization
  • RuleGo-Server
  • RuleGo-MCP-Server
  • AOP
  • Trigger
  • Advanced Topics
  • Performance
  • Standard Components
  • Extension Components
  • Custom Components
  • Components Marketplace
  • Overview
  • Quick Start
  • Routing
  • DSL
  • API
  • Options
  • Components
🔥Editor (opens new window)
  • RuleGo Editor (opens new window)
  • RuleGo Server (opens new window)
  • Github (opens new window)
  • Gitee (opens new window)
  • Changelog (opens new window)
  • English
  • 简体中文

广告采用随机轮播方式显示 ❤️成为赞助商
  • Quick Start

  • Rule Chain

  • Standard Components

    • Standard Components Overview
    • filter

    • action

      • log
      • functions
      • delay
      • groupAction
      • iterator
        • Configuration
        • Relation Type
      • for
      • exec
      • join
    • transform

    • external

    • flow

  • Extension Components

  • Custom Components

  • Components marketplace

  • Visualization

  • AOP

  • Trigger

  • Advanced Topic

  • RuleGo-Server

  • FAQ

  • Endpoint Module

  • Support

目录

iterator

iterator component: iterator. Traverse each value of msg or the specified field in msg to the next node. The traversed field must be an array or a {key:value} type。

Deprecated, use the `for` component instead

# Configuration

Field name Type Required Description Default value
fieldName string No Traversal field name, if empty, traverse the entire msg, support nested way to get msg field value, such as items.value, items ""
jsScript string No JS filter script for each item, optional, default is empty, match all items ""

jsScript:

  • function Filter(item,index,metadata)
    • item: The current traversed item
    • index: If it is an array, it represents the current traversed index, if it is a map, it represents the current traversed key
    • metadata: Message metadata
    • Return: true means match, false means not match

# Relation Type

  • True: If the item satisfies the JsScript condition, the item data will be sent to the next node through the True link
  • False: If the item does not satisfy the JsScript condition, the item data will be sent to the next node through the False link
  • Success: After the traversal is over, the original msg is sent to the next node through the Success link
  • Failure: If the specified field is not found, the js script execution fails or the traversed object is not an array or a {key:value}, it is sent to the Failure link
Edit this page on GitHub (opens new window)
Last Updated: 2025/04/02, 01:29:50
groupAction
for

← groupAction for→

Theme by Vdoing | Copyright © 2023-2025 RuleGo Team | Apache 2.0 License

  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式