I have an array of object `[{a:1},{a:2},{a:3},{a:4},{a:5}]`.

I want to find index of `{a:3}` and remove all next elements from index of `{a:3}`.

Result should look like `[{a:1},{a:2},{a:3}]` and removed elements will be `{a:4},{a:5}`.