Skip to content

docs: enable iterating over source arrays in entity mapping#122

Merged
kshitijsaxena-epilot merged 2 commits intomainfrom
docs/foreach-in-entity-mapping
May 8, 2026
Merged

docs: enable iterating over source arrays in entity mapping#122
kshitijsaxena-epilot merged 2 commits intomainfrom
docs/foreach-in-entity-mapping

Conversation

@kshitijsaxena-epilot
Copy link
Copy Markdown
Contributor

@kshitijsaxena-epilot kshitijsaxena-epilot commented Apr 28, 2026

Summary

  • Add documentation for new _each / _as / _map mapping operations
  • Covers syntax reference, nested iteration example (meter readings), _uniq composability, and usage tips

Context

The entity-mapping API now supports iterating over source arrays via _each. Previously, mapping array data required hardcoding each index (readings[0], readings[1], etc.), silently dropping any items beyond what was configured. This was a significant limitation for use cases like multi-meter/multi-counter meter readings, line items, and dynamic contact lists.

Related: entity-mapping-api MR for the backend implementation.

Test plan

  • Verify docs build locally (npm start)
  • Review rendered output for the new section between _template and Nesting

@kshitijsaxena-epilot kshitijsaxena-epilot force-pushed the docs/foreach-in-entity-mapping branch from 041c92a to 6e1257f Compare May 8, 2026 12:29
@kshitijsaxena-epilot kshitijsaxena-epilot merged commit 7f4db68 into main May 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant