I'm breaking my head with an item that maybe even simple to do but after twelve hours of work the mind does not help ... rsrsrsrs
Friends, I have a query stirng, for example:
&requiredfields=(Vencedor:vencedor).(Categoria:competitividade|Categoria:produtividade)
Where I need to add a new item to it in a specific position. See:
&requiredfields=(Vencedor:vencedor).(Categoria:jovem parceiro|Categoria:competitividade|Categoria:produtividade)
Note that it includes Categoria:jovem parceiro
in the query string at the beginning of the parentheses and made a breakdown with |
. The position of where this specific character begins I already have, to better contextualize, when items have the same key, they must be inside the same parentheses separated by |
, in this way, the position from where it begins - in this example -% how much do i already have I need to move on.
They could help me with this problem. I need to do this with JavaScript. Thanks in advance!