title: How to use lodash to get a value out of a complex array of objects?
body: <p>So i'm getting this pretty complex array from an API with lots of nested arrays with objects etc. It looks like this:  </p>
  
  <pre><code>    public data: any[] = [
      {
          language: 'Dutch',
          sources: [
              {
                  source: 'De Redactie',
                  channels: [
                      { channel: 'binnenland', value: false },
                      { channel: 'buitenland', value: false },
                      { channel: 'sport', value: false },
                      { channel: 'cultuur en media', value: false },
                      { channel: 'politiek', value: false },
                      { channel: 'financien', value: false }
                  ]
              },
              {
                  source: 'Tweakers',
                  channels: [
                      { channel: 'hardware', value: false },
                      { channel: 'software', value: false },
                      { channel: 'tech', value: false },
                      { channel: 'smartphones', value: false },
                      { channel: 'audio', value: false },
                      { channel: 'video', value: false }
                  ]
              }
          ]
      },
      {
          language: 'English',
          sources: [
              {
                  source: 'BBC',
                  channels: [
                      { channel: 'news', value: false },
                      { channel: 'sport', value: false },
                      { channel: 'weather', value: false },
                      { channel: 'travel', value: false },
                      { channel: 'politics', value: false }
                  ]
              },
              {
                  source: 'Fox News',
                  channels: [
                      { channel: 'u.s.', value: false },
                      { channel: 'world', value: false },
                      { channel: 'opinion', value: false },
                      { channel: 'politics', value: false },
                      { channel: 'entertainment', value: false },
                      { channel: 'business', value: false }
                  ]
              }
          ]
      }
  ]
  </code></pre>
  
  <p>And i can extract the value that i want (the channel property) with this function:</p>
  
  <pre><code>setChannel(channel: string, source: string, language: string) {
      for (const i of this.data) {
          if (i.language === language) {
              for (const j of i.sources) {
                  if (j.source === source) {
                      for (const k of j.channels) {
                          if (k.channel === channel) {
                              console.log(k.channel);
                          }
                      }
                  }
              }
          }
      }
  }
  </code></pre>
  
  <p>Now i'm sure that there is a function in lodash to simplify this. Because triple nested for's and if's is not a nice way of coding. But i can't seem to find it in the documentation. Could someone please point me in the right direction?</p>