Extract JSON object
<p>I have a JSON file that looks like this:</p>

<pre><code>[
"{'_filled': False,\n 'affiliation': u'Postdoctoral Scholar, University of California, Berkeley',\n 'citedby': 113,\n 'email': u'@berkeley.edu',\n 'id': u'4bahYMkAAAAJ',\n 'interests': [u'3D Shape',\n               u'Shape from Texture',\n               u'Shape from Shading',\n               u'Naive Physics',\n               u'Haptics'],\n 'name': u'Steven A. Cholewiak',\n 'url_citations': u'/citations?user=4bahYMkAAAAJ&amp;hl=en',\n 'url_picture': u'/citations?view_op=view_photo&amp;user=4bahYMkAAAAJ&amp;citpid=1'}",
"\n"]
</code></pre>

<p>I am using python to extract the value of citedby. However, I am not able to figure.
Here is my code:</p>

<pre><code>import json
json_data = open("output.json")

data = json.load(json_data)
print data[]
</code></pre>

<p>Now I know data would take an integer value whereas I would want to have it as a dictionary where in I could search using the key.
Is there any way I can achieve this?</p>

<pre><code>import json
import ast
json_data = open("output.json")

data = json.load(json_data)
print ast.literal_eval(data[0])['citedby']
</code></pre>

python json