title: Match between two dict
body: <p>This is the continuation of the previous question. I want to display just dict from lpar_proc that match with LPARNAME of validar_:</p>
  <pre><code>   &quot;validar_&quot;: [
          {
              &quot;LPARNAME&quot;: [
                  &quot;server1&quot;,
                  &quot;server2&quot;
              ]
          },
          {
              &quot;LPARNAME&quot;: [
                  &quot;server3&quot;
              ]
          }
      ]
  }
      &quot;lpar_proc&quot;: [
          {
              &quot;LPARNAME&quot;: &quot;server1&quot;,
              &quot;Name&quot;: &quot;CONT1&quot;,
              &quot;proc&quot;: &quot;1.05&quot;
          },
          {
              &quot;LPARNAME&quot;: &quot;server2&quot;,
              &quot;Name&quot;: &quot;CONT1&quot;,
              &quot;proc&quot;: &quot;0.25&quot;
          },
          {
              &quot;LPARNAME&quot;: &quot;server3&quot;,
              &quot;Name&quot;: &quot;CONT2&quot;,
              &quot;proc&quot;: &quot;0.05&quot;
          },
          {
              &quot;LPARNAME&quot;: &quot;server4&quot;,
              &quot;Name&quot;: &quot;CONT2&quot;,
              &quot;proc&quot;: &quot;0.35&quot;
          },
          {
              &quot;LPARNAME&quot;: &quot;server5&quot;,
              &quot;Name&quot;: &quot;PRD1&quot;,
              &quot;proc&quot;: &quot;1.15&quot;
          }
      ]
  }
  </code></pre>
  <p>expected output:</p>
  <pre><code>    &quot;lpar_proc&quot;: [
          {
              &quot;LPARNAME&quot;: &quot;server1&quot;,
              &quot;Name&quot;: &quot;CONT1&quot;,
              &quot;proc&quot;: &quot;1.05&quot;
          },
          {
              &quot;LPARNAME&quot;: &quot;server2&quot;,
              &quot;Name&quot;: &quot;CONT1&quot;,
              &quot;proc&quot;: &quot;0.25&quot;
          },
          {
              &quot;LPARNAME&quot;: &quot;server3&quot;,
              &quot;Name&quot;: &quot;CONT2&quot;,
              &quot;proc&quot;: &quot;0.05&quot;
          }
  </code></pre>
  <p>Im trying to use selectattr for searching inside validar_, but it doesnt display nothing. why is not working?</p>
  <pre><code>    - name: final
        debug:
          var: &quot;{{ reserved }}&quot;
        vars:
          reserved: &quot;{{ lpar_proc | selectattr('LPARNAME', 'in', validar_) }}&quot;   
  </code></pre>