var availableTags = [
{value:"fruit",desc:"fruit",groupId:2,userId:4},
{value:"aGan",desc:"normal user",groupId:4,userId:5},
{value:"father's home ",desc:"normal user",groupId:2,userId:4}
].sort(function(a, b) { return a.groupId > b.groupId; });
This sorts by groupId
field, but how do I to sort by groupId
and value
?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…