I have this action. Data comes from a form after a createRecord, and it is saved perfectly in the database.

```
App.ShowController = Ember.Controller.extend({
actions: {
    createShow: function() {
        var self = this;

        var onSuccess = function(res) {
            alert('CREATED OK ' + res.get('alias'));
        };

        var onFail = function() {
            alert('err ' + res);
        };

       self.get('model').save().then(onSuccess, onFail);
    }
}

```

});

The id is generated in the database (Postgres), and I return it in a perfectly formatted json response from the app (made in Mojolicious) `{"serverResponses":{"last_id":"500"}}` along with a '200' status.

I can see the network response in the console, with the json data.

But how can I access the last\_id value in the callback function onSuccess????

In "res" I have the original data I sent to the server, but, obviously its "id" attribute is undefined.

My idea es to "set" the returned id from the database in the "id" of the model.

I have seen a lot of questions about the returning format of the son, serialize problems, and so on, but what I really want to know is WHERE, in WHICH variable or object is the returned data?

Obviously, in case of Fail, I have the same problema. I return a perfectly formatted json with root for ember, but can't find it in the callback function onFail.

Can someone point me in the right direction?

Regards