here's the code:

```js
data = [
    {
        'id': 'asdja',
        'username': 'james',
    },
    {
        'id': 'asqweja',
        'username': 'rhou',
    },
    {
        'id': 'asdqweqj',
        'username': 'arianne'
    },
    {
        'id': 'qpoaksl',
        'username': 'ryan'
    }
];

```

I'm trying to check if `username` already exists.

For example if I input `"james"` then it should display `"Username already exists"`

I try to used find:

```
if (username === data.find((x: any) => x.username === x.username) {
 console.log('Username already exists');
} else {
 console.log('');
}

```