title: Access specific dictionary key from within Flask Template
body: <p>I'm setting up my personal website using Python and Flask. For the blog section, I am reading my blog posts from a <code>json</code> file and then displaying them via. a template. I'm am reading the file in python like so: </p>
  
  <pre><code>@app.route('/blog')
  def renderblog():
      filename = os.path.join(app.static_folder, 'blogs.json')
      with open(filename) as blog_file:
          data = json.load(blog_file)
  
      return render_template("blog.html", posts=data['posts'])
  </code></pre>
  
  <p>The content of the <code>json</code> file is: </p>
  
  <pre><code>{
    "posts": {
      "1": {
        "title": "Welcome",
        "author": "mikeres0",
        "date": "",
        "tags": "welcome,intro,outline",
        "content": "&lt;p&gt;Test content&lt;/p&gt;",
        "hidden": "0"
      },
      "2": {
        "title": "Welcome",
        "author": "mikeres0",
        "date": "",      
        "tags": "",
        "content": "&lt;p&gt;Test content&lt;/p&gt;",
        "hidden": "1"
      }
    }
  }
  </code></pre>
  
  <p>Within the template, I am displaying the content like: </p>
  
  <pre><code>{% if posts %}
    {% for key, value in posts.items() %}
        {% for blogKey, blogValue in value.items() %}   
          {% if blogKey == 'title' %}
            {{ blogValue }}
          {% endif %}
          {% if blogKey == 'content' %}
            {{ blogValue|safe }}
          {% endif %}
        {% endfor %}
    {% endfor %}
  {% endif %}
  </code></pre>
  
  <p>The problem I'm having is that although the <code>json</code> is formatted how I'd like it to be, when the file is read into a dictionary it does not keep it's ordering. In this specific case, how can I access certain key, value pairs? Please find a screenshot below. 
  <a href="https://i.stack.imgur.com/q00RP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/q00RP.png" alt="screenshot"></a></p>