title: In Flask convert form POST object into a representation suitable for mongodb
body: <p>I am using Flask and MongoDB. I am trying to convert the content of request.form into something suitable for saving via PyMongo. It seems like something that should come up often enough to have a ready-made solution.</p>
  
  <p>So what Flask give me is something like:</p>
  
  <pre><code>ImmutableMultiDict([('default', u''), ('required': u'on'), ('name', u'short_text'), ('name', u'another'), ('submit', u'Submit')])
  </code></pre>
  
  <p>And what I am looking to get is something close to this:</p>
  
  <pre><code>{
    'default': '',
    'name': ['short_text', 'another'],
    'required': true
  }
  </code></pre>