title: Save to a new JSON file then append every other record to it
body: <p>I wrote the code below to extract some information about a list of stock symbols and save them to a single JSON file. My issue is that the resulting JSON file contains only one record. Every time the process fetches information about a new symbol it deletes the old one from the JSON file and then writes the new record. What am I doing wrong?!</p>
  <p>One more side thing, I also want to add &quot;tqdm&quot; progress bar indicator to this process, how can I do that?</p>
  <pre><code>def get_stats(symbol):
      info = yf.Tickers(symbol).tickers[symbol].info
      stocks_info = {}
      info = {'symbol': symbol, 'longName': info['longName'], 'country': info['country'], 'sector': info['sector'],
              'industry': info['industry'], 'marketCap': info['marketCap'], 'currentPrice': info['currentPrice'],
              'quoteType': info['quoteType'], 'market': info['market']}
      stocks_info[symbol] = info
      json_object = json.dumps(stocks_info)
      with open(&quot;../tickers_data/stocks_info.json&quot;, &quot;w&quot;) as outfile:
          outfile.write(json_object)
  
  
  with ThreadPoolExecutor() as executor:
        executor.map(get_stats, sav_set)
  </code></pre>
  <p>Sample result:</p>
  <pre><code>{&quot;AKICU&quot;: {&quot;symbol&quot;: &quot;AKICU&quot;, &quot;longName&quot;: &quot;Sports Ventures Acquisition Corp.&quot;, &quot;country&quot;: &quot;United States&quot;, &quot;sector&quot;: &quot;Financial Services&quot;, &quot;industry&quot;: &quot;Shell Companies&quot;, &quot;marketCap&quot;: null, &quot;currentPrice&quot;: 9.91, &quot;quoteType&quot;: &quot;EQUITY&quot;, &quot;market&quot;: &quot;us_market&quot;}}
  </code></pre>
  <p>only one record!</p>