title: mapping dictonary a key with multiple values to json in python
body: <p>I am trying to map a dictionary with one key that has multiple values into python. Here is what I got.</p>
  
  <pre><code>import json
  
  list =['abe','matt','roscoe']
  key="name"
  nodes={}
  nodes.setdefault(key,list)
  ['abe', 'matt', 'roscoe']
  
  json_nodes =json.dumps(nodes)
  json_nodes
  '{"name": ["abe", "matt", "roscoe"]}'
  </code></pre>
  
  <p>But I would like to have a json file similar to this
  [
   {
          "name": "abe"
      },
      {
          "name": "matt"
      },
      {
          "name": "roscoe"
      }
  ]</p>
  
  <p>Any suggestions will be greatly appreciated. Thanks in advance. </p>