0
排序多維數組我有我需要排序數組的數組,但我無法得到它想通了。我的主陣列(mainArr)如下所示:在Actionscript中
mainArr = ({code:"1", date:"1/2/2001", status:"Active"},
{code:"2", date:"6/2/2004", status:"Terminated"},
{code:"3", date:"2/2/2003", status:"Transferred"},
{code:"4", date:"9/2/2003", status:"Active"});
我需要按照對象中的日期對mainArr進行排序。該列表應該如下所示:
mainArr = ({code:"1", date:"1/2/2001", status:"Active"},
{code:"3", date:"2/2/2003", status:"Transferred"},
{code:"4", date:"9/2/2003", status:"Active"}.
{code:"2", date:"6/2/2004", status:"Terminated"});