I have an array which consists of hash's:

```
people = [{'name':'Bob','id':12}, {'name':'Sam','id':25}, ...etc]

```

Is there any easy way to check if the array people contains a hash which contains an id 16 for example?

If this can be done with another data structure, please suggest it. I'm not stubborn on using a hash. I just need to store name and id (which may expand to more fields later).

I come from a Java/C background, if that helps in your explanation.