我有一个对象值的映射。我想根据其对象值的属性对它们进行排序。
这是示例地图:
var map = new Map();
map.set("8014",{
"Access to support": null,
"Capacity": 1,
"Comfort Level": null,
"Control Level": 1,
"Growth Mindset": 1.5405405405405403,
"Horizon": null,
"Motivation": null,
"Open-Mindedness": null,
"Proactivity": null,
"Resiliency": null,
"Segment": "Level value 1"});
map.set("8015",{
"Access to support": null,
"Capacity": 1,
"Comfort Level": null,
"Control Level": 1,
"Growth Mindset": 1.5405405405405403,
"Horizon": null,
"Motivation": null,
"Open-Mindedness": null,
"Proactivity": null,
"Resiliency": null,
"Segment": "Level value 2 or 5"});
map.set("8016",{
"Access to support": null,
"Capacity": 1,
"Comfort Level": null,
"Control Level": 1,
"Growth Mindset": 1.5405405405405403,
"Horizon": null,
"Motivation": null,
"Open-Mindedness": null,
"Proactivity": null,
"Resiliency": null,
"Segment": "Level value 3 or 5"});
我想根据值对象的 Segment 属性对其进行排序。任何帮助将不胜感激!
隔江千里
相关分类