select dict object based on value
<p>This is how my JSON object looks like:</p>

<pre><code>[{
    'Description': 'Description 1',
    'OutputKey': 'OutputKey 1',
    'OutputValue': 'OutputValue 1'
},
{
    'Description': 'Description 2',
    'OutputKey': 'OutputKey 2',
    'OutputValue': 'OutputValue 2'
},
{
    'Description': 'Description 3',
    'OutputKey': 'OutputKey 3',
    'OutputValue': 'OutputValue 3'
},
{
    'Description': 'Description 4',
    'OutputKey': 'OutputKey 4',
    'OutputValue': 'OutputValue 4'
},
{
    'Description': 'Description 5',
    'OutputKey': 'OutputKey 5',
    'OutputValue': 'OutputValue 5'
},
{
    'Description': 'Description 6',
    'OutputKey': 'OutputKey 6',
    'OutputValue': 'OutputValue 6'
}]
</code></pre>

<p>How do i grab the dict object where OutputKey is 4 without looping thru?</p>

<p><code>any(key['OutputKey'] == 'OutputKey 4' for key in myJSON)</code> returns true but i need it to grab the whole JSON object that belongs to that key.</p>

<p>You have a list of dicts. If you know the index of the required dict, then you can index that list:</p>

<pre><code>output_4 = myJSON[3]
</code></pre>

<p>Otherwise, you'll be looping through, even if the loop is not obvious (as with your <code>any</code> approach):</p>

<pre><code>for d in myJSON:
    if d['OutputKey'] == 'OutputKey 4':
        result = d
        break
</code></pre>

python