title: Android: JSON object getString
body: <p>I use this JSON <a href="https://api.github.com/users" rel="nofollow noreferrer">https://api.github.com/users</a></p>
  
  <p>I need to get string name, followers, following, and more. But on the program says "No value for name". I think I need to go to a specific user example: <a href="https://api.github.com/users/mojombo" rel="nofollow noreferrer">https://api.github.com/users/mojombo</a> to getting that info, but I don't know-how.</p>
  
  <p>And I using loopj library.</p>
  
  <p>Here's My Code</p>
  
  <pre><code>private fun getDataGitDetail() {
          progressBar.visibility = View.VISIBLE
          val client = AsyncHttpClient()
          client.addHeader("Authorization", "token 6fe9dff2e5e43d25eb3abe9ff508a750b972f725")
          client.addHeader("User-Agent", "request")
          val url = "https://api.github.com/users"
          client.get(url, object : AsyncHttpResponseHandler() {
              override fun onSuccess(
                  statusCode: Int,
                  headers: Array&lt;Header&gt;,
                  responseBody: ByteArray
              ) {
                  progressBar.visibility = View.INVISIBLE
                  val result = String(responseBody)
                  Log.d(TAG, result)
                  try {
                      val jsonArray = JSONArray(result)
                      for (i in 0 until jsonArray.length()) {
                          val jsonObject = jsonArray.getJSONObject(i)
                          val username: String? = jsonObject.getString("login")
                          val name: String? = jsonObject.getString("name")
                          val avatar: String? = jsonObject.getString("avatar_url")
                          val company: String? = jsonObject.getString("url")
                          val location: String? = jsonObject.getString("url")
                          val repository: Int = 0
                          val followers: Int = 0
                          val following: Int = 0
                          listData.add(
                              Data(
                                  username,
                                  name,
                                  avatar,
                                  company,
                                  location,
                                  repository,
                                  followers,
                                  following
                              )
                          )
                      }
                      showRecyclerList()
                  } catch (e: Exception) {
                      Toast.makeText(this@MainActivity, e.message, Toast.LENGTH_SHORT)
                          .show()
                      e.printStackTrace()
                  }
              }
  
              override fun onFailure(
                  statusCode: Int,
                  headers: Array&lt;Header&gt;,
                  responseBody: ByteArray,
                  error: Throwable
              ) {
                  progressBar.visibility = View.INVISIBLE
                  val errorMessage = when (statusCode) {
                      401 -&gt; "$statusCode : Bad Request"
                      403 -&gt; "$statusCode : Forbidden"
                      404 -&gt; "$statusCode : Not Found"
                      else -&gt; "$statusCode : ${error.message}"
                  }
                  Toast.makeText(this@MainActivity, errorMessage, Toast.LENGTH_LONG)
                      .show()
              }
          })
      }
  </code></pre>