How to set array of object as parameters using customGET ?
ridoansaleh opened this issue · 0 comments
ridoansaleh commented
I have an object which contains an array as one of its property.
var filter = {
category: 1,
page: 1,
product: 20,
price_range: ['bt', 1, 150]
}
Then in the service to get data
getRawList: function(filter) {
return rawProducts.customGET("",{
category: filter.category,
page: filter.page,
page_size: filter.page_size,
'price_range[]': filter.range_price,
shipping: filter.shipping,
color:filter.color,
brands: filter.brands
}).then(function successCallback(response) {
response.category = filter.category;
return response;
}, function errorCallback(response){
console.log(response);
});
}
It doesn't display an error AND it doesn't display the correct data as well.