# Json\_foreach and json\_foreach\_reverse access counter

**URL:** https://community.mp3tag.de/t/json-foreach-and-json-foreach-reverse-access-counter/61578
**Category:** Development
**Created:** [July 16, 2023, 12:14pm UTC](https://community.mp3tag.de/t/json-foreach-and-json-foreach-reverse-access-counter/61578 "2023-07-16T12:14:50Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [July 19, 2023, 8:47pm UTC](https://community.mp3tag.de/t/json-foreach-and-json-foreach-reverse-access-counter/61578/2 "2023-07-19T20:47:47Z")

</div>

This is now available as `json_foreach_counter` with [Mp3tag v3.21b](https://community.mp3tag.de/t/455) with an option parameter for the number of digits padded with leading zeros if necessary.

`json_foreach_counter 1`  
Returns: `1,2,3,4`

`json_foreach_counter 2`  
Returns: `01,02,03,04`

---

_[View the full topic](https://community.mp3tag.de/t/json-foreach-and-json-foreach-reverse-access-counter/61578)._
