Reputation:
as per api request i must send data categories: [1,2,3,4]
I have tried
data: {
categories: [1,2,3,4]
}
But it gets sent as
categories[]:1
categories[]:2
categories[]:3
Not as ategories: [1,2,3,4]
How can i send an array of numbers in angularjs $http method
categories: [1,2,3,4]
Upvotes: 0
Views: 37
Reputation:
Finally i have found the answer to my question after alot of research https://github.com/angular/angular.js/issues/3121
I should have sent it as "categories[]": [1,2,3,4]
not as categories = [1,2,3]
Upvotes: 1