{
  "source": "iteratorGroup.js",
  "hidden": true,
  "method": "reduce",
  "type": "group",
  "definitions": {
    "name": {
      "type": "string"
    }
  },
  "input-schema": {
    "type": "object",    
    "properties": {
      "collection": {
        "description": "A collection to reduce.",
        "type": "any",
        "required": true
      },
      "initial": {
        "type": "any"
      }
    }
  },
  "groups": {
    "default": {
      "start": {
        "schema": {
          "expression": "{$extractItemSchemaWithIndex(input.collection)}"
        }
      },
      "end": {
        "schema": {
          "type": "object",
          "properties": {
            "accumulator" : {
              "type": "any",
              "expression": "{$extractItemSchema(input.collection)}"
            } 
          }
        }
      }
    }
  },
  "output-schema": {
    "expression": "{$extractItemSchema(input.collection)}"
  },
  "meta": {
    "name": "reduceGroup",
    "description": "Repeatedly apply a group of steps against each element in an array, reducing data to an accumulator.",
    "icon": {
      "type": "fa",
      "name": "repeat",
      "color":"#747CA3"
    }
  }
}