title: Django - How to check multiple variables in the view or in the template
body: <p>I have a site that the user selects a drop-down menu item, inputs some JSON, and then clicks "Parse". Then the JSON data is checked against certain properties based on the drop-down menu item. Basically I have a list that looks like this.</p>
  
  <pre><code>myList = [{'Prop1': ['asdf', 'wefef']}, {'prop3': ['ss']}, {'prop2': ['d']}]
  </code></pre>
  
  <p>This is all the data I am checking against. It is the property name and then a list of expected values for that property name. Then in the JSON I have to compare those properties against the JSON properties in the list above.</p>
  
  <p>Right now I am not sure where the best way to go about checking these. Should I do it in my <code>views.py</code> or should I do it in the <code>page.html</code>?</p>
  
  <p>Basically I will need to look through <code>myList</code> and check if that property is in the JSON. If so then I need to check it against the expected property. And then I need to print things in a row so that you can view the info like:</p>
  
  <pre><code>Property   Excepted Value   Actual Value    P/F
  prop1      asdf, wefef      apple           F
  prop2      d                d               P
  prop3      ss               sd              F
  </code></pre>
  
  <p>My issue is, this will be a bunch of logic to build out to parse correctly. I am new to Django and not sure if the amount of code should be done in the HTML file. Else, I would need to build a large string in the views.py that contains all the data and the HTML, then pass to the HTML file and just display a single variable that displays all the data.</p>