title: Java 8 Lambda - filter two ArrayList
body: <p>I have two lists. The first one is an ID list of regions, the second one is a node list which has nested region objects.</p>
  
  <p>Structure of my <code>nodeList</code>:</p>
  
  <pre><code>....{
   "id": 6412,
   "name": "303000201",
   "description": "desc",
   "organization": {
      "id": 41065,
      "name": "adad",
      "address": null
   },
   "region": {
      "id": 21,
      "name": "Quba rayonu",
      "code": "303"
   },
   "nodeType": {
      "id": "WELL",
      "name": "Quyu",
      "description": null
   },
   "location": {
      "id": 6412,
      "latitude": 41.36735554,
      "longitude": 48.5041245554
   }} ......
  </code></pre>
  
  <p>And region list:</p>
  
  <pre><code>{
    "regions": ["56", "44"]
  }
  </code></pre>
  
  <p>I must filter my <code>nodeList</code> for region ID. I do it the old way but I want to do it with lambda expressions. How can I do it?</p>
  
  <p>I googled, tried, but it doesn't work :/ </p>
  
  <pre><code>result= nodeList.stream()
                  .filter(n -&gt; regionIDList.equals(n.getRegion().getId().toString()))
                  .collect(Collectors.toList());
  </code></pre>
  
  <p>Thank you in advance.</p>