I have two arrays. 

```
Array1 = ['cat','dog','elephant','pig'] 
Array2 = ['cat','scat','pig','spig','bat'].

```

I need an object that contains key as the values of `Array1` and values to be the similar words that are similar to the key. I tried using `filter` and `indexOf` but it didn't seem to work

Expected Result:

```
{
  cat: ['cat','scat'],
  dog: [],
  pig: ['pig','spig'] 
}

```