Say I have an object structured like this:
const carObj = {"1234":"Corvette","4321":"Subaru","8891":"Volvo"};
And I have an array that represents the key (or ID):
const myArray = [1234, 4321, 8891, 1234, 4321]
I want a loop, function, or something that will go through the object of arrays and return the value for the corresponding key. I am using vue.js and attempting to do this in a computed method. Any help would be much appreciated.
Expected output:
Corvette
Subaru
Volvo
Corvette
Subaru