compare 2 array of dictionaries for none matched items in python
<p>I have 2 huge array of dictionaries ,that looks similar to :</p>

<p>array1 (errat1  in the code below ):</p>

<pre><code>[{'advisory_name': 'CL-SA-2016:0071', 'advisory_type': 'Security Advisory', 'issue_date': '2016-01-26 21:00:00', 'advisory': 'CL-SA-2016:0071'}]
</code></pre>

<p>the array 2 is similar in structure:(errat2  in the code below )</p>

<pre><code>[{'advisory_name': 'CL-SA-2016:2098', 'advisory_type': 'Security Advisory', 'issue_date': '2016-10-23 21:00:00', 'advisory': 'CL-SA-2016:2098'}]
</code></pre>

<p>if fact there is much more items in the dictionary of course </p>

<p>I am getting the above arrays from API</p>

<p>my code looks like:</p>

<pre><code>chnnls = client.channel.listMyChannels(key)
for chnnl in chnnls:
      if  valid_label1(chnnl['label']): #this is regex function to limit the dictionary items to errat1 items only
          errat1 =  client.channel.software.listErrata(key, chnnl['label'])
      if  valid_label2(chnnl['label']): #this is regex function to limit the dictionary items to errat2 items only

          errat2 =  client.channel.software.listErrata(key, chnnl['label'])

matches = []
errat_indexed = {}

for item in errat1:
    errat_indexed[(item["advisory_name"])] = item

for item in errata2:
    if not (item["advisory_name"]) in errat_indexed:
            matches.append(item)

for only in matches:
    print only['advisory_name']
</code></pre>

<p>my goal is to compare the 2 array of dictionaries   arrata1 and errata2 for only the values of 'advisory_name' ,and get only the values of 'advisory_name' that exits only on errata2 array dictionary . my code doesn't give me Amy results output from the script.</p>