In D3.js (or in JavaScript in general) if you have an array like

```
var out = [
    {name:"John", car:"bmw", colour:"blue"},
    {name:"Joe", car:"ford", colour:"red"},
    {name:"Anna", car:"honda", colour:"green"},
    {name:"Mary", car:"bmw", colour:"red"},
];

```

how can I get `car`and/or `colour` for a given name please? The names can be considered as unique and the array doesn't necessarily have to be an array ie a dict should also be fine

Thanks