I have a data like this:
export const keyOrders: {} = {
"aa": { active: true, order: 0, val: "aaa" },
"bb": { active: true, order: 6, val: "bbb" },
"cc": { active: true, order: 2, val: "ccc" },
"dd": { active: true, order: 7, val: "ddd" },
"ee": { active: false, order: 4, val: "eee" },
"ff": { active: true, order: 5, val: "fff" }
};
I am trying to push to array if active is only true and sort based on order value.
So far I have tried this
this.pdfKeys = Object.entries(this.dashboardElementsConfig)
.filter(([key, value]) => {
return value["active"];
})
.map(([key, value]) => {
return key;
})
I am not sure how to sort based on order number given.