If I were to create a data structure like this:
const carObj = {"1234":"Corvette","4321":"Subaru","8891":"Volvo"};
And also have an array that contains the IDs:
const myArray = [1234, 4321, 8891, 1234, 4321]
I am looking for a way, using a loop or function, to iterate through the object and return the corresponding values based on the keys. This implementation is within vue.js as part of a computed method. Any assistance on achieving this would be greatly appreciated.
Desired result:
Corvette
Subaru
Volvo
Corvette
Subaru