我正在编写一个有查询的云函数:
var query = new Parse.Query("A");
query.ascending("age");
在查找结束后,我遍历结果:
query.find({
success: function(results){
// here I iterate through and want to iterate through expecting to follow the sort...
for (var i = 0; i < results.length; ++i) {
a = results[i];
console.log(("found A object after save, age = "+ a.get("age"));
}
},
error:function(......
........
})
问题是日志不会打印&#34; a&#34;按年龄排序的对象。
我如何按顺序遍历A objets,所以按照年龄排序查询应该给我回来?