title: Python if json record exists dont add duplicate
body: <p>So basically I just want to check if the json record already exitst in the json file and if so I don't want to add it. Is it possible guys? I just can't figure it out. I hope somebody could help me. I would really appreciate it.</p>
  
  <p><strong>main.py</strong></p>
  
  <pre><code>with io.open('data.json', 'a', encoding='utf-8') as fp:
  for f in unique_following:
      data = {}
      data['insta'] = []
      data['insta'].append({  
      'id': f,
      'dm': False
      })
      json.dump(data,fp,indent=1)
  
  with open('data.json') as fp:
  for f in unique_following:
      recipients=f
      print(text,recipients)
      time.sleep(5)
  </code></pre>
  
  <p><strong>data.json</strong></p>
  
  <pre><code>{
   "insta": [
    {
     "id": 6864438512,
     "dm": false
    }
   ]
  }{
   "insta": [
    {
     "id": 7467167660,
     "dm": false
    }
   ]
  }
  </code></pre>
  
  <p><strong>So if that record writes to data.json</strong></p>
  
  <pre><code>{
   "insta": [
    {
     "id": 6864438512,
     "dm": false
    }
   ]
  }
  </code></pre>
  
  <p><strong>I want this output</strong></p>
  
  <pre><code>{
   "insta": [
    {
     "id": 6864438512,
     "dm": false
    }
   ]
  }{
   "insta": [
    {
     "id": 7467167660,
     "dm": false
    }
   ]
  }
  </code></pre>