I have an array of non-sorted objects:

```
const participants = [
    {code: '222222', is_winner: true},
    {code: '444444', is_winner: false},
    {code: '777777', is_winner: false},
    {code: '555555', is_winner: true},
    {code: '666666', is_winner: false},
    {code: '111111', is_winner: false},
    {code: '333333', is_winner: false},
];

```

How do I find the nearest object, which is\_winner key is true, **given** a participant, which is\_winner key is always false.

```
if participant = {code: '333333', is_winner: false} 
=> 
Should return {code: '555555', is_winner: true}

if participant = {code: '444444', is_winner: false} 
=> 
Should return {code: '222222', is_winner: true}

```

I'm looking to get a participant that has won(is\_winner is true) that is the closest to a non-winner participant. The array is noncircular.