title: python update dict in list or append if doesn't exist
body: <p>I am trying to update existing json file which has list of dict in python3</p>
  
  <pre><code>    .
      .
  
      "guests": [
          {
              "name": "name1",
              "package": {
                  "age": "30",
                  "dob": "Oct 10",
                  "image": "name1.img",
                  "address": "xxx"
              }
          },
          {
              "name": "name2",
              "package": {
                  "age": "20",
                  "dob": "Oct 10",
                  "image": "name2.img",
                  "address": "xxx"
              }
          }
      ]
  
      .
      .
  </code></pre>
  
  <p>I want to update each guests data with new data, if guest (<code>name</code>) doesn't exists then append guest data to the list as a new guest.</p>
  
  <p>how can I achieve this in python ?</p>