title: Filter tableview based on an item in another tableview
body: <p>I have a <code>UITableView</code> displaying comments which are dynamically displayed through <code>JSON</code>. On the same page, I have another UITableView as a Filter.</p>
  
  <p>The filter displays a list of the types of comments. I need to filter the main tableview based on the type of comment selected from the filter tableview.</p>
  
  <p>Filter <code>TableView1</code> based on item selected in <code>TableView2</code>.</p>
  
  <p><strong>TableView1 - Main tableview<br>
  TableView2 - Filter tableview</strong></p>
  
  <p>Following is an image of the page:</p>
  
  <p><a href="https://i.stack.imgur.com/bph88.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bph88.png" alt="enter image description here"></a></p>
  
  <p>For instance, if I select "Worst Moments" in TableView2, TableView1 should display only those rows that contain the comment with "Worst Moments" as a keyword in it.</p>
  
  <p>Can anyone help me with a code, how to filter items in TableView1 based on an item selected in TableView2?</p>