I have an array containing objects like

```
[
  {
   "name": "foo",
   "value": "bar"
   },
   {
    "name": "foo1",
    "value": "bar1"
   }
]

```

and I want something like

```
{"foo":"bar","foo1":"bar1"}

```

Can someone please help me out with this ?