title: UITableView with section Filter for json
body: <p><a href="https://i.stack.imgur.com/rTOdO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rTOdO.png" alt="enter image description here" /></a></p>
  <p>Expected result</p>
  <p><a href="https://i.stack.imgur.com/0eMNt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0eMNt.png" alt="enter image description here" /></a>
  I have below json response, but I am unable to filter data keeping section with <strong>user_name</strong></p>
  <pre><code>{
      &quot;status&quot;: 1,
      &quot;result&quot;: {
          &quot;Section 0&quot;: [
              {
                  &quot;id&quot;: &quot;240&quot;,
                  &quot;user_name&quot;: &quot;Raman &quot;,
  
              },
              {
                  &quot;id&quot;: &quot;241&quot;,
                  &quot;user_name&quot;: &quot;Ram &quot;,
  
              },
              {
                  &quot;id&quot;: &quot;243&quot;,
                  &quot;user_name&quot;: &quot;Ramesh &quot;,
  
              },
              {
                  &quot;id&quot;: &quot;246&quot;,
                  &quot;user_name&quot;: &quot;Angelia &quot;,
              }
          ],
          &quot;Section 1&quot;: [
              {
                  &quot;id&quot;: &quot;240&quot;,
                  &quot;user_name&quot;: &quot;Rohit &quot;,
        
              },
              {
                  &quot;id&quot;: &quot;241&quot;,
                  &quot;user_name&quot;: &quot;Robin &quot;,
             
              },
              {
                  &quot;id&quot;: &quot;246&quot;,
                  &quot;user_name&quot;: &quot;Angelia &quot;,
        
              }
          ],
          &quot;Section 2&quot;: [
              {
                  &quot;id&quot;: &quot;240&quot;,
                  &quot;user_name&quot;: &quot;Raman &quot;,
              
              },
              {
                  &quot;id&quot;: &quot;242&quot;,
                  &quot;user_name&quot;: &quot;Nick &quot;,
  
              }
          ]
      },
      &quot;message&quot;: &quot;&quot;
  }
  </code></pre>
  <p><strong>Code I used for general search in any tableview with normal json</strong></p>
  <pre><code>    let searchpredicate:NSPredicate = NSPredicate(format: &quot;SELF CONTAINS[cd] %@&quot;,searchText)
   filterdata  = self.responseArray.filter{searchpredicate.evaluate(with: $0)} as! [[String : Any]]
               
  </code></pre>