Hi,
I'm getting JSON from a server and this contains stuff like "address","firstname" etc. I want to map these automatically to my defined type without using case or if statements.
Type Record (address as string,firstname as string)
Normally you would do
Dm newRecord as Record
newRecord.address = "test"
But I want to get the address field name in a variable and do something like newRecord.$field = json value
$field = json fieldname
newRecord.$field
Is that actually possible in B4A?
I'm getting JSON from a server and this contains stuff like "address","firstname" etc. I want to map these automatically to my defined type without using case or if statements.
Type Record (address as string,firstname as string)
Normally you would do
Dm newRecord as Record
newRecord.address = "test"
But I want to get the address field name in a variable and do something like newRecord.$field = json value
$field = json fieldname
newRecord.$field
Is that actually possible in B4A?