If I have the form field name how do I get the corresponding id?
for example
item[a][b][c]
→ item_a_b_c
does it work in all possible scenarios to just remove ]$
, replace ][
with _
and [
with _
name.replace(/]$/, "").replaceAll("][", "_").replaceAll("[", "_")