When fetching Backbone.js Collections from an API, Backbone expects a JSON array:
[
{
id: 1,
name: "whatever"
},
{
id: 2,
name: "another"
}
]
I guess this is a security risk, see: JSON security best practices?
I would like to make Backbone understand the following format:
{
things: [
{
id: 1,
name: "whatever"
},
{
id: 2,
name: "another"
}
]
}
I there an easy way of doing this?