title: Ansible incremental update for loop in set_fact not working
body: <p>I have below registered variable output. And I am trying to get the unique <code>tagId</code>s from this output.</p>
  <p>Ansible Version: <code>2.9.6</code></p>
  <pre><code>   &quot;results&quot;: [
          {
              &quot;json&quot;: [
                  {
                      &quot;tags&quot;: [
                          {
                              &quot;tagId&quot;: 123
                          },
                          {
                              &quot;tagId&quot;: 1014
                          }
                      ]
                  }
              ]
          },
          {
              &quot;json&quot;: [
                  {
                      &quot;adp_release&quot;: &quot;xxxxxx&quot;,
                      &quot;tags&quot;: [
                          {
                              &quot;tagId&quot;: 111
                          },
                          {
                              &quot;tagId&quot;: 1014
                          }
                      ]
                  }
              ]
          }
      ]
  </code></pre>
  <p><strong>Trying with the below code:</strong>
  This is only retuning the last element tags from the <code>results</code> list. Incremental update for loop in set_fact not working.</p>
  <pre><code>          - name: get all tags
              set_fact: alltags={{ item.json[0]['tags'] | map(attribute='tagId') | list |unique }}
              with_items: &quot;{{ results }}&quot;
  
            - debug: var=alltags
  </code></pre>
  <p>How to get a combined list of values?</p>