Reputation: 35679
My server side will reply with json look like {} && {"id":2....}
. i use jquery.ajax to GET the response. but i keep getting "error parseerror" , how to parse data like this using jquery.ajax?
Upvotes: 2
Views: 555
Reputation: 7465
You should return only one json object at a time. If you need to return more than one data model, then build an array or set of objects in the json object.
{itemOne:{}, itemTwo:{}, arrayOfSomething:[]}
Upvotes: 1