title: Converting Flask form data to JSON only gets first value
body: <p>I want to take input from an HTML form and give the output in JSON format. When multiple values are selected they are not converted into JSON arrays, only the first value is used.</p>
  
  <pre><code>@app.route('/form')
  def show_form():
      return render_template('form.html')
  
  @app.route("/result", methods=['POST'])
  def show_result():
      result = request.form
      return render_template('result.html', result=result)
  </code></pre>
  
  <p><code>form.html</code>:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;form method=POST&gt;
     &lt;input name=server&gt;
     &lt;select name=owners multiple&gt;
         &lt;option value="thor"&gt;thor&lt;/option&gt;
         &lt;option value="loki"&gt;loki&lt;/option&gt;
         &lt;option value="flash"&gt;flash&lt;/option&gt;
         &lt;option value="batman"&gt;batman&lt;/option&gt;
     &lt;/select&gt;
     &lt;input type=submit&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p><code>result.html</code>:</p>
  
  <pre class="lang-html prettyprint-override"><code>{{ result|tojson }}
  </code></pre>
  
  <p>When multiple values for owner are selected, "thor" and "flash", the output shows only one value:</p>
  
  <pre><code>{"server": "app-srv", "owners": "thor"}
  </code></pre>
  
  <p>I expect  owners to be a list:</p>
  
  <pre><code>{"server": "app-srv", "owners": ["thor", "flash"]}
  </code></pre>
  
  <p>How do I display the form as JSON without losing list values?</p>