title: Filter json payload based upon filter array
body: <p>Input payload</p>
  <pre><code>{
      &quot;student&quot;: {
          &quot;id&quot;: 123,
          &quot;class&quot;: &quot;seventh&quot;,
          &quot;activities&quot;: {
              &quot;curriculum&quot; {
                  &quot;certification&quot;: [&quot;Cyber-security&quot;, &quot;Python&quot;],
                  &quot;year&quot;: [2021, 2021]
              },
              &quot;extra-curriculum&quot;: {
                  &quot;field&quot;: [&quot;volleyball&quot;]
              },
              &quot;others&quot;: [&quot;student-forum&quot;]
          }
      }
  }
  
  filterList-
  &quot;filterList&quot;: [&quot;id&quot;, &quot;class&quot;, &quot;certification&quot;, &quot;year&quot;, &quot;field&quot;, &quot;others&quot;]
  </code></pre>
  <p><strong>Expected Output:</strong></p>
  <pre><code>{
      &quot;id&quot;: 123,
      &quot;class&quot;: &quot;seventh&quot;,
      &quot;certification&quot;: [&quot;Cyber-security&quot;, &quot;Python&quot;],
      &quot;year&quot;: [2021, 2021]
      &quot;field&quot;: [&quot;volleyball&quot;]
      &quot;others&quot;: [&quot;student-forum&quot;]
  }
  </code></pre>
  <p>This can be done by tracking the key eg:</p>
  <pre><code>(&quot;year&quot;:payload.student.activites.curriculum.year) if( filterList contains &quot;year&quot;)
  </code></pre>
  <p>But this is very lengthy and boring process when you have huge payload. Is there any generalized way of doing this?</p>