How to JQuery parse the string?

Want to get from the string SoutContracts[work_address][0] the number 0.

The task is simple. There is a field
<input type="text" id="soutcontracts-work_address_ar-0" class="form-control" name="SoutContracts[work_address][0]" value="some address">

you need to clone in compliance with the order of the index of the attribute name

input s can be a lot and the last index is not known.
July 2nd 19 at 13:10
1 answer
July 2nd 19 at 13:12

Find more questions by tags jQuery