From 450ebdda43a462a85de92c1f5843170a2e1348ad Mon Sep 17 00:00:00 2001 From: Hashim Khan Date: Wed, 22 Jul 2026 23:29:44 +0500 Subject: [PATCH] docs: note array index access with this.[n] in #each Document segment-literal notation for reading fixed indexes when iterating arrays of arrays. Fixes #188. --- src/guide/builtin-helpers.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/guide/builtin-helpers.md b/src/guide/builtin-helpers.md index 4d2a00a0..345447cf 100644 --- a/src/guide/builtin-helpers.md +++ b/src/guide/builtin-helpers.md @@ -108,6 +108,18 @@ The first and last steps of iteration are noted via the [`@first`](../api-refere Nested `each` blocks may access the iteration variables via depth based paths. To access the parent index, for example, `{{@../index}}` can be used. +When the current item is itself an array, use +[segment-literal notation](expressions.md#literal-segments) to read a fixed index. Plain `this[0]` is not valid +Handlebars syntax; write `this.[0]` instead: + +```handlebars + +``` + ::: ## #with