我有数组对象ArrObject
object = {
Active: true, // type: boolean
Code: '12345' // type: string
}
然后我想按Active
字段对这个数组进行排序Code
。我需要帮助才能做到这一点underscoreJs
。
更新
我的数据:
data = [
{
Code: "Code0",
Description: "Description0",
IsActive: true,
id: 0
},
{
Code: "Code1",
Description: "Description1_edit",
IsActive: true,
id: 1
},
{
Code: "Code5",
Description: "Description5_edit",
IsActive: false,
id: 2
}]