开发者

How to change JSON object before send ExtJS

开发者 https://www.devze.com 2023-01-21 06:37 出处:网络
I everyone i have a JSON Array that is construct like this for (var i = 0; i < count; i++) { 开发者_JAVA百科var record = myDataStore.getAt(i);

I everyone i have a JSON Array that is construct like this

 for (var i = 0; i < count; i++) 
            {                
    开发者_JAVA百科            var record = myDataStore.getAt(i);

                if (record.dirty){                    
                   submitRecords[currentIndex] = record.data;
                   //alert(submitRecords[currentIndex].ConversionDate);
                   currentIndex++;
                }
            }

The problem is that inside the record.data there are dates and when i tried to send it to my WCF service of course give me an error because it does not have the properly date format, an i was wondering is there someway to change specific properties of my JSON object with or without Ext


record.data.field = value;


sorry i was doing it wrong

record.data.ConversionDate=Ext.util.getMicrosoftAjaxDate(record.data.ConversionDate);

PD. Ext.util.getMicrosoftAjaxDate is a generic own Function to parse dates

0

精彩评论

暂无评论...
验证码 换一张
取 消