title: How can I limit and filter a collection by key value in a jekyll theme?
body: <p>I'm trying to output one item from a collection where sticky: "true".</p>
  
  <p>I've tried <a href="https://stackoverflow.com/questions/34162726/getting-a-specific-item-from-a-collection-in-jekyll#34165968">Getting a specific item from a collection in Jekyll</a>
  From collection <code>_defense/dui.html</code><hr></p>
  
  <pre><code>---
  layout: right-sidebar
  title: "Drug Offense"
  crumbtitle: "drug-related crime"
  permalink: "/practice-law/criminal-law/drug-offense.html"
  sticky: true
  twitter: "Working on this"
  
  facebook: "Civil Litigation can cost you hundreds if not thousands of dollars if you are not adequately protecting your rights. Civil Litigation can be anything from traffic tickets, hurricane insurance claims to medical malpractice. Call or write for a free, no obligation review of your situation."
  
  web: "An arrest for a drug offense can have significant consequences. Drug offense charges can range from possession to trafficking and can carry significant penalties, including minimum mandatory prison sentences.
  
  
  The Prosecutor’s process of deciding what if any criminal charges to file can be a very critical stage in the case. This process happens very early in a case and as your lawyers, we can impact this decision.
  
  
  **DO NOT** make a statement to law enforcement without consulting us first. Call Cagan &amp; Cagan today for a free consultation."
  </code></pre>
  
  <p>In collection page <code>_practices/criminal-defense.html</code></p>
  
  <pre><code>    &lt;!-- One --&gt;
  {% assign defenses = site.defense | where:"true", "page.sticky" | limit:1 %}
  {% assign defense = defense[0] %}
  {{ defense | inspect }}
      &lt;section class="wrapper style4 container"&gt;
          &lt;div class="row gtr-150"&gt;
              &lt;div class="col-8 col-12-narrower"&gt;
                  &lt;!-- Content --&gt;
                  &lt;div class="content"&gt;
                      &lt;section&gt;
                          &lt;header&gt;
                              &lt;a href="#" class="image featured"&gt;
                                  &lt;h2&gt;{{ defense.title }}&lt;/h2&gt;
                              &lt;/a&gt;
                          &lt;/header&gt;
                          &lt;p&gt;{{ defense.web | markdownify }}&lt;/p&gt;
                      &lt;/section&gt;
                  &lt;/div&gt;
          &lt;/div&gt;
  </code></pre>
  
  <p>I get nil value right now. I want the first item with sticky true and end there.</p>