title: Getting the difference from two arrays Ansible
body: <p>I have this array of names and a main object I want to intersect the two, the common will be removed the and the rest will be retained.</p>
  
  <p>VPC Names</p>
  
  <pre><code>["A_VPC", "B_VPC"]
  </code></pre>
  
  <p>ECS_OBJECTS</p>
  
  <pre><code>[{
  "vpc_name": "A_VPC",
  "client_name": "A"
  },
  {
  "vpc_name": "B_VPC",
  "client_name": "B"
  },
  {
  "vpc_name": "C_VPC",
  "client_name": "C"
  }]
  </code></pre>
  
  <p>The end result I want will be that every common will be removed except C because they are not in common with the two objects.</p>
  
  <pre><code>[{
  "vpc_name":"C_VPC",
  "client_name": "C"
  }]
  </code></pre>
  
  <p>My code thus far is some like this..</p>
  
  <pre><code>- name: Intersect ecs_instances objects to the existing VPC created
    set_fact:
      vpc_to_be_created: "{{ ecs_instances | difference(vpc_names) }}"
  </code></pre>