I have an array of dictionary objects that looks like
[0: Object {key: "Bags_Under_Eyes", value: Array(600)}
1: Object {key: "Black_Hair", value: Array(600)}
2: Object {key: "Blond_Hair", value: Array(600)}
3: Object {key: "Eyeglasses", value: Array(600)}
4: Object {key: "Gray_Hair", value: Array(600)}
5: Object {key: "Heavy_Makeup", value: Array(600)}
6: Object {key: "High_Cheekbones", value: Array(600)}
7: Object {key: "Male", value: Array(600)}
8: Object {key: "Mouth_Slightly_Open", value: Array(600)}
9: Object {key: "Smiling", value: Array(600)}
10: Object {key: "Wearing_Lipstick", value: Array(600)}
11: Object {key: "Young", value: Array(600)}]
I need to index them using an array of keys, which is a separate object. Let's say that this array looks like the following,
[0: "Heavy_Makeup"
1: "Bags_Under_Eyes"
2: "Wearing_Lipstick"
3: "Black_Hair"
4: "Male"
5: "Young"
6: "High_Cheekbones"
7: "Smiling"
8: "Blond_Hair"
9: "Gray_Hair"
10: "Mouth_Slightly_Open"
11: "Eyeglasses"]
I cannot figure out how to sort using two different objects. Is there a simple solution to this?