title: Parse object of dynamic string with Moshi and Retrofit
body: <p>I have a JSON like below.</p>
  <pre><code>{
      &quot;code&quot;: &quot;success&quot;,
      &quot;response&quot;: {
          &quot;data&quot;: {
              &quot;xyz&quot;: &quot;abc.pdf&quot;,
              &quot;abc: &quot;efgh.pdf&quot;
          }
      },
      &quot;message&quot;: &quot;Files downloaded Successfully&quot;
  }
  </code></pre>
  <p>Inside data in the response object, the key is dynamic (xyz, abc etc). I am using Moshi in the retrofit converter. My data classes are as follows.</p>
  <pre><code>data class RestResponse&lt;T&gt; (
      val code: String,
      val message: String,
      val response: T
  )
  
  data class ProposalDownloadResponse(val data: DownloadData)
  
  data class DownloadData(val list: Map&lt;String, String&gt;)
  </code></pre>
  <p>But I am getting <strong>null</strong> in the list after parsing. <strong>Though I have data</strong>.</p>
  <p>Refrofit function is like below.</p>
  <pre><code>@POST
  suspend fun downloadProposal(
      @Url url: String,
      @Header(&quot;accessToken&quot;) key: String,
      @Body flightDetails: FlightDetails,
  ): GenericResponse&lt;RestResponse&lt;ProposalDownloadResponse&gt;&gt;
  </code></pre>