title: Having problems trying to output blog post data using jinja
body: <p>So I have this dummy json file which has id, title, subtitle, and post, using npoint here's the link to json data: <a href="https://api.npoint.io/5abcca6f4e39b4955965" rel="nofollow noreferrer">https://api.npoint.io/5abcca6f4e39b4955965</a>, and what i'm trying to do was display the title and subtitle of the 3 posts from the dummy json file. I used jinja multi line to loop through the post within the html. But I keep getting an error, I've tried printing out the data to console and it worked just fine.</p>
  <p>here's my server.py :</p>
  <pre><code>from flask import Flask
  from flask import render_template #grabs your html page to render
  import random
  import requests
  from datetime import datetime
   
  app = Flask(__name__)
   
   
   
  @app.route('/')
  def hello():
      return &quot;&lt;h1&gt; Welcome! &lt;/h1&gt;&quot;
   
  @app.route('/blog')
  def blog():
      blog_url = &quot;https://api.npoint.io/5abcca6f4e39b4955965&quot;
      response = requests.get(url=blog_url)
      data = response.json()
      return render_template(&quot;blog.html&quot;, posts=data)
   
  if __name__ == &quot;__main__&quot;:
      app.run(debug=True)
  </code></pre>
  <p>and heres my blog.html:</p>
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang=&quot;en&quot;&gt;
  &lt;head&gt;
      &lt;meta charset=&quot;UTF-8&quot;&gt;
      &lt;title&gt;Blog&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      {% for blog_posts in posts: %}
              &lt;h1&gt;{{ blog_posts[&quot;title] }}&lt;/h1&gt;
              &lt;h2&gt;{{ blog_posts[&quot;subtitle&quot;] }}&lt;/h2&gt;
      {% endfor %}
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  <p>Error :</p>
  <pre><code>File &quot;C:\Users\Vimalan\PycharmProjects\100CODECHALLENGE\Webdev\Blog\templates\blog.html&quot;, line 10, in template
  
  &lt;h2&gt;{{ blog_posts[&quot;subtitle&quot;] }}&lt;/h2&gt;
  jinja2.exceptions.TemplateSyntaxError: expected token ',', got 'subtitle'
  </code></pre>
  <p>any suggestions?</p>