I have written Post API that can accept Array of objects like [{"name":"ABC","city":"Banglo"},{"name":"AC","city":"Newyork"},{"name":"C","city":"Mumbai"}]
in Java using the Dropwizard framework.
Now I'm trying to call these API method through Backbone Collection create function.Ist i knew that create accept only one object at time like collection.create({"name":"ABC","city":"Banglore"})
.Suppose if I passed array of objects in create then it parsed as {"0":{"name":"ABC","city":"Banglor"},"1":{"name":"AC","city":"Newyork"},"2":{"name":"C","city":"Mumbai"}}
.
But Java API could not accept key value pair objects.So How can i call those API method from backbone collection.