title: How can I display only the data where the field is true
body: <p>I am displaying data from a json in my application, but I need to display only the data where the <strong>field always is true</strong>, in this case, I need just show the 7 and 8. How can I do this?</p>
  <p>This is my JSON example with the field true and null:</p>
  <pre><code>  {
       &quot;id&quot;: 6,
       &quot;title&quot;: &quot;Some title&quot;,
       &quot;content&quot;: &quot;Some content&quot;,
       &quot;always&quot;: null
    },
    {
       &quot;id&quot;: 7,
       &quot;title&quot;: &quot;Some title&quot;,
       &quot;content&quot;: &quot;Some content&quot;,
       &quot;always&quot;: true
    },
    {
       &quot;id&quot;: 8,
       &quot;title&quot;: &quot;Some title&quot;,
       &quot;content&quot;: &quot;Some content&quot;,
       &quot;always&quot;: true
    }
  </code></pre>
  <p>And I'm using this to fetch, but this code shows all the items</p>
  <pre><code>  componentDidMount = async () =&gt; {
      const parseJSON = (resp) =&gt; (resp.json ? resp.json() : resp)
  
      const checkStatus = (resp) =&gt; {
        if (resp.status &gt;= 200 &amp;&amp; resp.status &lt; 300) {
          return resp
        }
        return parseJSON
      }
      const headers = {
        'Content-Type': 'application/json'
      }
  
      try {
        const data = await fetch('http://myurl/api', {
          method: 'GET',
          headers
        }).then(checkStatus)
          .then(parseJSON)
        this.setState({ data })
      } catch (error) {
        this.setState({ error })
      }
    }
  
  render() {
    const { data } = this.state;
  
    return(
        &lt;ul&gt;
          {data.map(test =&gt;
             &lt;li key={test.id}&gt;
               &lt;h2&gt;{test.title}&lt;/h2&gt;
                &lt;p&gt;{test.content}&lt;/p&gt;
             &lt;/li&gt;
                )}
        &lt;/ul&gt;
    )
  }
  </code></pre>