title: How to combine two object lists by id and select non-null values in kotlin
body: <p>I want to combine two object lists. Each object has a specific id. If the same object exists in two lists, I want to merge them. And if a value is null I want to get the non-null one. For example:</p>
  <pre class="lang-kotlin prettyprint-override"><code>val list1 = listOf(
      Object(id = 1, hello, 100),
      Object(id = 2, null, 40)
  )
  
  val list2 = listOf(
      Object(id = 1, null, 100),
      Object(id = 2, test, 40),
      Object(id = 3, hi, 13)
  )
  </code></pre>
  <p>The result I want to achieve is as follows:</p>
  <pre class="lang-kotlin prettyprint-override"><code>val result = listOf(
      Object(id = 1, hello, 100),
      Object(id = 2, test, 40),
      Object(id = 3, hi, 13)
  )
  </code></pre>
  <p><strong>NOTE: if a value is not empty I know it is not different.</strong></p>