title: How to get Json Response in Arraylist from List<Item> using RxJava and Kotlin
body: <p>Facing Problem on getting Response in ArrayList. </p>
  
  <p>I have following Respose on String value </p>
  
  <pre><code> var res_message: String = ""
   res_message = "${result.vehicletypes} "
  </code></pre>
  
  <p>Getting below Value on this String</p>
  
  <pre><code>     [VehicleType(_id=1, vehicleType=Hatchback, __v=0), 
        VehicleType(_id=2, vehicleType=Maruti, __v=0), 
        VehicleType(_id=3, vehicleType=Honda, __v=0), 
        VehicleType(_id=4, vehicleType=Bike, __v=0)] 
  </code></pre>
  
  <p>Retrofit Result is </p>
  
  <pre><code> vehicletypes = {ArrayList@6055}  size = 4
   0 = {Model$VehicleType@6058} "VehicleType(_id=1, 
  vehicleType=Hatchback, __v=0)"
   1 = {Model$VehicleType@6059} "VehicleType(_id=2, 
   vehicleType=Maruti, __v=0)"
    2 = {Model$VehicleType@6060} "VehicleType(_id=3, 
   vehicleType=Honda, __v=0)"
    3 = {Model$VehicleType@6061} "VehicleType(_id=4, 
    vehicleType=Bike, __v=0)"
  </code></pre>
  
  <p>Below Code snippest sending request to API. </p>
  
  <pre><code>            disposable = apiServices.getVehicle(token)
              .subscribeOn(Schedulers.io())
              .observeOn(AndroidSchedulers.mainThread())
              .subscribe(
                      { result -&gt;
  
  
                          res_message = "${result.vehicletypes} "
                          Log.d("Type==", res_message)
                      },
                      { error -&gt;
                          res_message = "${error.message}"
                          // validateToken()
                      }
              )
  </code></pre>
  
  <p><em>Model Class</em></p>
  
  <pre><code>  data class Vehicles(val success: Boolean, val vehicletypes: List&lt;VehicleType&gt;, val message: String)
    data class VehicleType(val _id: String, val vehicleType: String, val __v: String)
  </code></pre>
  
  <p>I want to get this value on Arralist <strong>VehicleType</strong> List on below <strong>vehicleListArray</strong></p>
  
  <pre><code>   private var vehicleListArray: ArrayList&lt;Model.VehicleType&gt;? = null
  </code></pre>
  
  <p>How we can achieve this. 
  <strong>Thanks in advance.</strong> </p>