0
我试图转换集合中的属性。在这种情况下,我收到了一系列航班。财产FLDATE,即飞机离开日期,现在是date
财产。我想将其转换为string
属性。我不确定代码是否正确,因为我的Javascript知识有限。你如何看待以下功能?更改集合中的属性
function changeCollection (colIn)
{
var theList = new Collection();
for(var i = 0; i < colIn.length; i++)
{
var colItem = colIn[i];
colItem.FLDATE = colItem.FLDATE.toString();
theList[i] = colItem;
}
return theList;
}