I have 2 arrays
const statusesValues = ['progress', 'validate', 'blocked']
and
const statuses = [{status: 'progress' , id: 1}, {status: 'validate', id: 2}, {status: 'blocked', id: 3}, {status: 'no_validate', id: 4}]
I would like to get an array of id matches between the elements of the first array and the status properties of the second array.
In this example: [1, 2, 3]
What is the most elegant way to do it?