我有一个 JS 对象,带有另一个 JS 对象的内部数组。内部onw就像
function outerObj()
{
this.items = new Array();
this.clear = function () {
this.items = new Array();
}
function __item(v1, v2, v3, v4) {
this.Val_1 = v1;
this.Val_2 = v2;
this.Val_3 = v3;
this.Val_4 = v4;
}
this.add = function (vA, vB, vC, vD) {
this.items.push( new __item(vA, vB, vC, vD) );
}
...
}
该数组通过 SPServicesgetListItems()
调用加载,使用.each( . . . )
生成的 XML。结果是有序的(<OrderBy>
),但结果是常见的刺激:
1
10
11
2
21
3
42A
42B
我无法摆脱包含字母(这是现实世界项目的名称),而我希望排序是
1
2
3
10
11
21
42A
42B
建议?