There is HTML text in which there are several [] .
There is also an array of this type:
[[1,2], [3,4], [5,6]] That is, a corresponding array should be inserted (by index) into each “block” [] in the text.
Please help me realize this (without jquery), otherwise it doesn't work for me. The maximum that I have achieved is that I received an array of “blocks” [] , but I can’t replace them in the text in any way in order to get the source text with the replacement.