I have an object like this:
myObj = { 1:{name:'a'}, 2:{name:'v'}, 3:{name:'x'}, 10:{name:'t'} };
and I want to get a list of the values whose keys are in the following list:
myList = [1,2,10]
So the result I want is:
[{name:'a'},{name:'v'}, {name:'t'}]
Any ideas on how this can be done?
I tried the following:
const result = [];
for (const childId in state.frameObjects[id].childrenIds )
{
if(state.frameObjects[childId]!==undefined)
{
result.push(state.frameObjects[childId]);
}
}
return result;
but Vue console gives me this error : InternalError: "too much recursion"