I am using backgrid.js
for table that I want to fetch backgrid with two parameter.
Now here my code I am trying with one parameter. But I don't know how to send two parameter.
territories.fetch({ data: { status: 1 }, processData: true, reset: true });
If I understand your question correctly, you want to send multiple options to the data option of ajax. According to Backbone collection fetch documentation,
jQuery.ajax options can also be passed directly as fetch options, so to fetch a specific page of a paginated collection:
Documents.fetch({data: {page: 3}})
In your case, maybe you can do something like:
territories.fetch({
data: {
status: 1,
anotherParam: "another param value" // or whatever you want it to be
},
processData: true,
reset: true
});
We can pass as many parameters as we want, just like jQuery.ajax. ( Read about data
option )