How to transform attribute values into keys? : <p>I have a JSON in the format. </p>

<pre><code>var input = [
{status:"good", state: "NY"},
{status:"bad", state: "FL"},
{status:"decent", state: "CA"}
]
</code></pre>

<p>I want to transform it in an object of the format:</p>

<pre><code>myObj = {NY:"good",FL:"bad",CA:"decent"}
</code></pre>

<p>The reason I want this is so that I can easily grab the myObj.NY value.</p>
