Repeater Index

How can I get the index of the repeater item? I want to add an index or id to each item when it saves to the database
This is what I'm looking for, the index increments for each item in the repeater
[
  {
    "index": "1",
    "toDate": "2014-02-16",
    "fromDate": "2022-10-12",
  }
  {
    "index": "2",
    "toDate": "2014-02-16",
    "fromDate": "2022-10-12",
  }
]
Was this page helpful?