Hey!
I am currently working with a standard ListVew to display my data, but I want to convert this to the JsonListModel – to add filter options and also change the default display order – I have been reading through the documentation, but am struggling to get this to work when using nested JSON data;
For example, each user in my firebase database has a ‘user’ section, (and example for this is below)
Edward L {
"admin" : 1,
"allowances" : {
"2028" : {
"taken" : 0,
"total" : 13216,
}
},
"details" : {
"email" : "edward@email.com",
"firstname" : "Edward",
"group" : "T&G Canary Wharf",
"subGroup" : "Reception",
"surname" : "L"
},
"groupStatus" : 1
},
User 2 {…},
User 3 {…}
Previously – I set my ListView’s model to ‘Object.keys()’ then used a readonly property to access nested data, but am struggling in translating this across,
For my use-case, I would be accessing the above JSON, but only needing to use the ‘details’ branch of the data for my filters or section header – I.e sort by firstname/surname/subgroup;
How would I go about working multiple nested json objects to create my listView!?
Thanks for any help!
Edd