I have an array of id's in JS, like so
var ids = [123,456,789]
I am trying to pass them as part of a querystring in a GET request to a .NET API application. From what I understand .NET needs the querystring to resemble endpoint/ids=123&ids=345&ids=789
or similar.
I've tried using $.param({ ids: ids } )
but it ends up as ids%5B%5D=123&ids%5B%5D=456&ids%5B%5D=789
How can I do this?
Here's my html link to use it. I'm using knockout databinding
and observables
<a class="btn btn-sm btn-default" data-bind="attr:{'href':'bill/' + bills().map((data) => {return data.billId;}), 'target':'_blank'}">
<i class="fa fa-print"></i>
Click
</a>
and it currently returns
bill/123,456,789