I have input that is sent to my db query:

```
[25,1381,34, ...]

```

My data is then returned from the query, but the db has changed the order of what is returned.

```
[{
    id: 1381,
    name: 'Test'
}, {
    id: 25,
    name: 'Another test'
}, {
    id: 34,
    name: 'One last test'
}, 
...]

```

I want to reorder the data and return to the caller in the order that the id's were sent in. ie:

```
[{
    id: 25,
    name: 'Another test'
}, {
    id: 1381,
    name: 'Test'
}, {
    id: 34,
    name: 'One last test'
}, 
...]

```

What would be a performant way to reorder the data into the original order?