let params = {
open_raffle_id: '{{ open_raffle.id }}',
type: 'BUY',
ordering: 'option,site,-id',
}
params = Object.keys(params)
.map(function (key) {
return '' + key + '=' + params[key];
})
.join('&');
https://stackoverflow.com/questions/32464948/mapping-object-to-key-value-string-in-one-line