How do I bind value from JSON to ListView ? Here's...
# getting-started
d
How do I bind value from JSON to ListView ? Here's sample of my JSON
Copy code
[{"kodenik":"2013129733","namakaryawan":"YASTI RIZKIA","kodebagian":"TRIE","tglupdate":"2019-12-09","tglabsen":"2019-12-09","jamin":"10:05","jamout":""},
{"kodenik":"2015184941","namakaryawan":"AGUNG SUBEKTI","kodebagian":"TUOL","tglupdate":"2019-12-09","tglabsen":"2019-12-09","jamin":"17:03","jamout":""}]
s
First of all you have convert this json into java/kotlin objects and then you can set that list to adapter. You can use the third party library like Gson, Jackson etc. to convert json into object or refer - https://gist.github.com/francisrod01/54c3ff6b8af547b71161
d
Can I convert that using JSONArray ?
s
yes