I have below json to populate the recyclerview item
{
"success": true,
"data": {
"houses": [
{
"id": 1,
"house_id": "HOUSEAGA00001",
"ward_number": "23",
"staus_id":1,
"name_of_resident": "Melroy",
"phone_number": "9890098900",
"amount_due": 5000,
"created_date": "2018-10-12T18:30:00.000Z",
"updated_date": "2018-10-12T18:30:00.000Z"
},
{
"id": 2,
"house_id": "HOUSEAGA00002",
"ward_number": "24",
"staus_id":1,
"name_of_resident": "Prajyot",
"phone_number": "9823598235",
"amount_due": 10000,
"created_date": "2018-10-12T18:30:00.000Z",
"updated_date": "2018-10-12T18:30:00.000Z"
}
],
"payment_statuses": [
{
"id": 1,
"type": "Collected",
"color_hex": "#00ff00"
},
{
"id": 3,
"type": "Owner unavailable",
"color_hex": "#ff9900"
},
{
"id": 2,
"type": "Owner Denied",
"color_hex": "#ff0000"
}
]
},
"count": 2,
"error": []
}
I am using house array to populate recycler view item, but there is one field in item called status where I have to get status id from houses array and get it its respective type from payment_statuses array. The problem is how do I get the type from staus payment_statuses array from houses array in recycler view holder.