title: Return value in Observe Kotlin
body: <p>How to return a value from Observer?</p>
  
  <pre><code>    val clockInAndOutTime = ClockInAndOutTime()
      clockInAndOutTime.id = 12
      longToast("Name " +displayName(clockInAndOutTime.id.toString()))
  
   private fun displayName(userId: String): String {
  
          var name = ""
          organizationViewModel.refreshList()
          organizationViewModel.organization.observe(
              this, Observer { resource -&gt;
                  resource?.data.let {
                      it?.forEach { organization -&gt;
                          if (organization.user_id == userId) {
                              name = organization.user_name!!
                              Log.d(TAG, "name is $name")
                          }else{
                              Log.d(TAG,"not found")
                          }
                      }
                  }
              }
          )
          return name
      }
  </code></pre>
  
  <p>In displayName function, we are able to get the name, but in toast, the <code>Name</code> is always display empty.</p>