Fetching and retrieving collections in Backbone with node

I'm trying to find a way how to save and retrieve the whole state of my collection to the server (MySQL) via nodeJS. Therefore I've overridden the the fetch and save function of the collection

var TrackList = Backbone.Collection.extend({
 model: app.Track,
 fetch: function() {
  var socket = io.connect('http://localhost:9001');
  socket.emit('load', {id: window.id});
  socket.on('success', function(data) {
   var collectionState = JSON.parse(data[0].data);
   //now what to do with the collectionState on fetch
  }
 },
 save: function() {
  var socket = io.connect('http://localhost:9001');
  socket.emit('save', { project: app.Tracks.toJSON(), id: window.id });
 }
});
app.Tracks = new TrackList();
app.Tracks.fetch();

The save works well and write it to the MySQL database by using node-mysql. When trying to 'load' I get the correct data from the database, but I don't know how to push the colletionState object into the TrackList itself.

The JSON is in the correct form (i think at least)

[{"modelAttr1":"attr1","modelAttr2":"attr2"}]

You could call the add method of the collection. If you pass an Object it creates a new Model and add to the collection, but if you pass an Array(as it is your case) it convert every item of the array into Models of the collection, so you only need to send the response. Something like this:

var TrackList = Backbone.Collection.extend({
 model: app.Track,
 initialize : function(){
   //helpful for catch the "this" in the AJAX response to the current Collection
   _.bindAll(this);
 },
 fetch: function() {
  var socket = io.connect('http://localhost:9001');
  socket.emit('load', {id: window.id});
  socket.on('success', this.parse);
 },
 parse: function(data){
   var collectionState = JSON.parse(data[0].data);
   this.add( collectionState );
 },
 save: function() {
  var socket = io.connect('http://localhost:9001');
  socket.emit('save', { project: app.Tracks.toJSON(), id: window.id });
 }
});
app.Tracks = new TrackList();
app.Tracks.fetch();