Closed Rykus0 closed 11 months ago
I would also like to see this feature. Thank you.
Closing this because this repository is about the website and not about the Mustache template language. Please take comments about the template language to https://github.com/mustache/spec/discussions.
Previous discussions about this particular topic can be found via https://github.com/mustache/spec/discussions/163, https://github.com/mustache/spec/discussions/153 and https://github.com/mustache/spec/discussions/164.
I've found it extremely limiting not to be able to have a reference to the current index while rendering lists of data. An example of when this is useful is when each rendered item needs a unique ID.
Currently the workaround is to include this unique ID in the data, but that is error-prone and not really the correct place for it.
Thank you for considering this feature