title: How to filter array with specific key react native
body: <p>I have an array like below:</p>
  <pre><code>const data = [
  {&quot;id&quot;:&quot;1&quot;, &quot;sender&quot;:&quot;user1&quot;, &quot;receiver&quot;:&quot;user2&quot;, &quot;msg&quot;:&quot;hello!&quot;},
  {&quot;id&quot;:&quot;2&quot;, &quot;sender&quot;:&quot;user2&quot;, &quot;receiver&quot;:&quot;user1&quot;, &quot;msg&quot;:&quot;yo!&quot;},
  {&quot;id&quot;:&quot;3&quot;, &quot;sender&quot;:&quot;user3&quot;, &quot;receiver&quot;:&quot;user1&quot;, &quot;msg&quot;:&quot;hi!!&quot;},
  {&quot;id&quot;:&quot;4&quot;, &quot;sender&quot;:&quot;user1&quot;, &quot;receiver&quot;:&quot;user3&quot;, &quot;msg&quot;:&quot;hmm&quot;},
  ...
  ]
  </code></pre>
  <p>What I want to do is this. Suppose, I only want to see the conversation between user1 and user 2.</p>
  <p>So I want to filter the array and make a new array which will contain only those data where sender is <strong>user1</strong> and receiver is <strong>user2</strong> or sender is <strong>user2</strong> and receiver is <strong>user1</strong>.</p>
  <p>I think, it can be done using map or stuff like that but I actually have no idea. I am new to React Native.</p>