我有下面的 json 来填充 recyclerview 项目
{
"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": []
}
我正在使用 house 数组来填充 recycler 视图项目,但是项目中有一个名为 status 的字段,我必须从 house 数组中获取状态 ID,并从 payment_statuses 数组中获取其各自的类型。问题是我如何从回收站视图持有者中的房屋数组中获取状态支付状态数组中的类型。