I am using can.Model to retrieve data using id :
Invoice = can.Model({ findAll: 'GET /invoices', create : "POST /invoices", update : "PUT /invoices/{id}", destroy : "DELETE /invoices/{id}" },{});
When switching to /invoices result will be as expected, for example:
[ 0: { "ID": "1", "Client": "Client1", }, 1: { "ID": "2", "Client": "Client2" } ]
However, the data obtained using Invoice.findAll and registered on the console is as follows: one data item is repeated for each item in the list:
[ 0: { "ID": "1", "Client": "Client1" }, 1: { "ID": "1", "Client": "Client1" } ]
The answer from the server is correct, so why is it interpreted as a list of identical elements?
source share