title: Cannot find all match value in nested list Kotlin
body: <p>Hey I have list i want to find all matching item. I tried some code but it not working all finding items. I need to do in efficient way. I guess my below code returns first matching item.</p>
  <p><strong>Group</strong></p>
  <pre><code>data class Group(
      val key: Int,
      val value: MutableList&lt;GroupValue?&gt;
  )
  </code></pre>
  <p><strong>GroupValue</strong></p>
  <pre><code>data class GroupValue(
      val isRead: Boolean? = null,
      val id: String? = null
  )
  </code></pre>
  <p><strong>Main.kt</strong></p>
  <pre><code>fun main() {
      val value = listOf(
          Group(0, mutableListOf(GroupValue(true, &quot;1&quot;))),
          Group(1, mutableListOf(GroupValue(true, &quot;2&quot;))),
          Group(2, mutableListOf(GroupValue(false, &quot;3&quot;))),
          Group(3, mutableListOf(GroupValue(true, &quot;4&quot;))),
          Group(4, mutableListOf(GroupValue(false, &quot;5&quot;))),
          Group(5, mutableListOf(GroupValue(true, &quot;6&quot;))),
          Group(6, mutableListOf(GroupValue(true, &quot;7&quot;), GroupValue(false, &quot;8&quot;))),
          Group(7, mutableListOf(GroupValue(true, &quot;9&quot;), GroupValue(false, &quot;10&quot;))),
          Group(8, mutableListOf(GroupValue(false, &quot;11&quot;), GroupValue(false, &quot;12&quot;), GroupValue(false, &quot;13&quot;))),
          Group(9, mutableListOf(GroupValue(false, &quot;14&quot;), GroupValue(true, &quot;15&quot;))),
          Group(10, mutableListOf(GroupValue(true, &quot;16&quot;)))
      )
  
      val list = value.slice(2..9)
      var groupValue: GroupValue? = null
      list.forEach { messageGroup -&gt;
          groupValue = messageGroup.value.find { it?.isRead == false }
          if (groupValue != null) {
              println(groupValue)
          }
      }
  }
  </code></pre>
  <p><strong>Output getting through above code</strong></p>
  <pre><code>GroupValue(isRead=false, id=3)
  GroupValue(isRead=false, id=5)
  GroupValue(isRead=false, id=8)
  GroupValue(isRead=false, id=10)
  GroupValue(isRead=false, id=11)
  GroupValue(isRead=false, id=14)
  </code></pre>
  <p><strong>Expected output</strong></p>
  <pre><code>GroupValue(isRead=false, id=3)
  GroupValue(isRead=false, id=5)
  GroupValue(isRead=false, id=8)
  GroupValue(isRead=false, id=10)
  GroupValue(isRead=false, id=11)
  GroupValue(isRead=false, id=12)
  GroupValue(isRead=false, id=13)
  GroupValue(isRead=false, id=14)
  </code></pre>