Parse and stringify urls with array and object params in javascript