I have an array of objects, like this:

```
var companies = [
    { "name" : "Company 1",
      "logo" : "/logo.gif" },
    { "name" : "Company 2",
      "logo" : "/logo2.gif" },
    { "name" : "Company 3",
      "logo" : "/logo3.gif" } ];

```

I want to filter this array to get only values which have a name which exists in another array:

```
var myCompanies = [ "Company 1", "Company 3" ];

```

In this example, the data to be returned would be:

```
var companies = [
    { "name" : "Company 1",
      "logo" : "/logo.gif" },
    { "name" : "Company 3",
      "logo" : "/logo3.gif" } ];

```

What's the best way to do this?