haris mehmood
08/25/2021, 11:09 AM"data": [
{
"player_id": 2497,
"firstname": "Jay-Alistaire Frederick",
"lastname": "Simpson",
"birthday": "1988-12-01",
"age": 32,
"weight": 85,
"height": 180,
},
{
"player_id": 2570,
"firstname": "Simranjit",
"lastname": "Singh Thandi",
"birthday": "1999-10-11",
"age": 21,
"weight": null,
"height": null,
}]
Hi i want to replace value of "weight" to 0 if its null from backend. How to do it in Data Class ? Any solutionOrhan Tozan
08/25/2021, 12:05 PMif (player.weight == null) player.copy(weight = 0)
haris mehmood
08/25/2021, 12:27 PMnilTheDev
08/25/2021, 2:03 PMharis mehmood
08/26/2021, 4:24 AMnilTheDev
08/26/2021, 5:13 AM