How to write server-side response values to javascript console?

I’m having a brain freeze… Looking at the code from https://docs.webix.com/desktop__dataprocessor.html

Track successful and unsuccessful server-side responses separately with the help of onAfterSync and onAfterSaveError events respectively:

Successful server response

dp.attachEvent('onAfterSync', function(statusObj, text, data, loader){
    var response = data.xml(),
    hash = response.data;
    //hash {status:"", id:"", newid:""}      
});
  • status - the status of operation (“success”/“error”/“invalid”);
  • id - obligatory, item ID that was sent to the server for update;
  • newid - item ID returned from the server after update.

I want to write status, id, and newid to the javascript console. How do I get their values?

Thanks.

This sample is a bit incorrect for connectors, we will fix it.

The thing that in case of connectors data.xml() will return actual response of the connector, which has a different notation. In general,

// correlation default = connector
status = type;
id = sid;
newid = tid;

So the response from data.xml() will look like

{
   data:{
      action:{
         type:"insert",
         sid:"1509108514798",
         tid:"18"
      }
   }
}