title: Append values to a list of json objects
body: <p>I'm collecting weather data and trying to create a list that has the latest (temperature) value by minute.</p>
  
  <p>I want to add them to a list, and if the list does not contains the "minute index" it should at it as a new element in the list. So the list always keeps the latest temperature value per minute:</p>
  
  <pre><code>def AddValue(arr, value):
      timestamp = datetime.datetime.utcnow().strftime("%Y-%m-%d %H:%M")
  
      for v in arr['values']:
          try:
              e = v[timestamp]     # will trigger the try/catch if not there
              v[timestamp] = value
          except KeyError:
              v.append({ timestamp: value })
  
  history = [
      { 'values': [ {'2017-12-22 10:20': 1}, {'2017-12-22 10:21': 2}, {'2017-12-22 10:22': 3} ] },
  ]
  
  AddValue(history, 99)
  </code></pre>
  
  <p>However, I'm getting </p>
  
  <pre><code>AttributeError: 'dict' object has no attribute 'append'**
  </code></pre>