Hi, I want to send data for json format.
This is my data format.
data = {models: Array(1)}, type = "update....
I want to send data like this.
data = {foo: 'bar', locale: 'en', name: 'test', description: '1', ...}
This data is same as {models:Array(1)} 's array.
My code is here. I used parameterMap to data format for change.
parameterMap: function (data, type) { if (type === "update") { debugger; return kendo.stringify(data.models[0]); } return kendo.stringify(data); }
But when sending data, DataSource.transport.update send another data like this.
var users = new kendo.data.DataSource({ transport: { update: { contentType: contentType, url: function (options) { return base_api_url_manage_users + "info/" + options.models[0].userId ; }, type: "PUT", },
They send this format.
data = {models: Array(1)}, type = "update....
I want to send data form as Objcet, not as Object in Array. How can I change this data format???
Please help me.
Thank you.