?
кроме первого на &
?transactions?TransactionsSearch[statuses][]=closed&TransactionsSearch[statuses][]=decline&TransactionsSearch[statuses][]=pending&TransactionsSearch[statuses][]=open?TransactionsSearch[specifications][]=transfer_main_user_to_main_company&TransactionsSearch[specifications][]=bonus_charge&TransactionsSearch[specifications][]=wallet_in_for_order_pay_blockchain&TransactionsSearch[direction]=all&TransactionsSearch[limit]=10
var str = 'transactions?TransactionsSearch[statuses][]=closed&TransactionsSearch[statuses][]=decline&TransactionsSearch[statuses][]=pending&TransactionsSearch[statuses][]=open?TransactionsSearch[specifications][]=transfer_main_user_to_main_company&TransactionsSearch[specifications][]=bonus_charge&TransactionsSearch[specifications][]=wallet_in_for_order_pay_blockchain&TransactionsSearch[direction]=all&TransactionsSearch[limit]=10'
str.replace(/\?/g, '&').replace('&', '?');