title: Save value from JSON string to .txt file in Python
body: <p>I have a pretty weird JSON string from which I need specific values saved in a .txt file.</p>
  <p>The string looks like this:</p>
  <pre><code>{&quot;available&quot;:[{&quot;place&quot;:&quot;abc&quot;,&quot;stock&quot;:3},{&quot;place&quot;:&quot;abcd&quot;,&quot;stock&quot;:5}]}
  </code></pre>
  <p>So I need to extract the &quot;place&quot; and &quot;stock&quot; into a list.
  So the result should look like this:</p>
  <pre><code>abc 3
  abcd 5
  </code></pre>
  <p>I tried it with:</p>
  <pre><code>with open(&quot;available.txt&quot;, &quot;w&quot;) as f:
    for i in list['available']:
      f.write(I['place'] + ['stock'] + '\n')
  </code></pre>
  <p>But it won't work. I think its because the &quot;stock&quot; value does not have any &quot;&quot;. Is it possible to do what I want with Python?</p>