how to print json data
<p>I have following json file and python code and i need output example...</p>

<p><strong>json file</strong></p>

<pre><code>{"b": [{"1": "add"},{"2": "act"}],
"p": [{"add": "added"},{"act": "acted"}],
"pp": [{"add": "added"},{"act": "acted"}],
"s": [{"add": "adds"},{"act": "acts"}],
"ing": [{"add": "adding"},{"act": "acting"}]}
</code></pre>

<p><strong>python</strong></p>

<pre><code>import json
data = json.load(open('jsonfile.json'))
#print data
</code></pre>

<p><strong>out put example</strong></p>

<pre><code>&gt;&gt; b
&gt;&gt; p
&gt;&gt; pp
&gt;&gt; s
&gt;&gt; ing
</code></pre>

<p>any ideas how to do that?</p>

<p>Here's a working example (it's emulating your file using <a href="https://docs.python.org/3/library/io.html#io.StringIO" rel="nofollow">io.StringIO</a>):</p>

<pre><code>import json
import io

jsonfile_json = io.StringIO("""
{
    "b": [{"1": "add"}, {"2": "act"}],
    "p": [{"add": "added"}, {"act": "acted"}],
    "pp": [{"add": "added"}, {"act": "acted"}],
    "s": [{"add": "adds"}, {"act": "acts"}],
    "ing": [{"add": "adding"}, {"act": "acting"}]
}
""")

data = json.load(jsonfile_json)

for k in data.keys():
    print(k)
</code></pre>

<p>As you can see, the answer to your question is using <code>keys()</code> method</p>

python json python-3.x