Android Question Converting list of maps to list of arrays

toby

Well-Known Member
Licensed User
Longtime User
I want to get data, number of records, from a remote mysql database and populate a B4XTable with it. The problem I'm having is B4XTable.SetData() expects a list of arrays while
httpjob returns a list of maps.
B4X:
            Dim parser As JSONParser
            parser.Initialize(j.GetString)
            Dim root As List = parser.NextArray

Is there an easy way to convert a list of maps to a list of arrays?
 

RB Smissaert

Well-Known Member
Licensed User
Longtime User

Just loop through the map keys and/or values copy to array and add the arrays to the list.

RBS
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…