in_groups_of
{% assign batches = products | in_groups_of: 50 %}
{% for batch in batches %}
{% log "Batch size: " | append: batch.size %}
{% endfor %}Syntax
{{ array | in_groups_of: size }}Parameter
Description
Return Value
Examples
{% assign batches = product_ids | in_groups_of: 10 %}
{% for batch in batches %}
{% assign ids = batch | join: "," %}
{% log "Processing batch: " | append: ids %}
{% endfor %}Notes
Last updated