title: How do I filter through a list of objects that contains lists?
body: <p>Imagine I have a json like the following:</p>
  
  <pre><code>[
      {
          field: string,
          roles: [
              {
                  id: int,
                  providedFor: int
              },
              {
                  id: int,
                  providedFor: int
              },
              ...
          ]
      },
      {
          field: string,
          roles: [
              {
                  id: int,
                  providedFor: int
              },
              {
                  id: int,
                  providedFor: int
              },
              ...
          ]
      },
      {
          field: string,
          roles: [
              {
                  id: int,
                  providedFor: int
              },
              {
                  id: int,
                  providedFor: int
              },
              ...
          ]
      }
  ]
  </code></pre>
  
  <p>And this is parse into a list of objects and call this list providers.
  How can I go about filtering/streaming this list, find the correct provider then breaking out?</p>
  
  <p>I've tried something like the following:</p>
  
  <pre><code>providers.parallelStream().filter(p -&gt; p.getRoles().parallelStream().filter(r -&gt; r.getProvidedFor.equal("something")).findFirst());
  </code></pre>