RESTSerializer Manipulating Payload


#1

Hello everybody, working with Dreamfactory delivers a json in the format {record: [ { id:1, name:testname}, { id:2, name:testname2} ] }

After hours at the DOC and google i still don’t get it who to change the payload/hash to

{mymodel: [ { id:1, name:testname}, { id:2, name:testname2} ] }

Thank you for your time. Best regards, Janos


#2

extractArray: function(store, type, payload) { var modelname = payload.record; payload = { modelnames: modelname}; return this._super(store, type, payload); },