I am having an javascript array with objects in it:

```
var array;
array[{name: "Peter",class: "7"},{name: "Klaus",class: "3"}];

```

How to find out if in this array is the name Peter?

EDIT: I want to have something like this

```
if (array.find("Peter"))
{
  ...
}

```