You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to store data in my registers using jsonDecode/jsonEncode. Once I decode my object I want to convert it to a Map by iterating over the object's keys. The only way I can see to do this is to use object.class.fields... but this seems to filter out numeric keys and the result is an empty array ([]). My object is keyed by weapon and chip ID, which are numeric. Is there an alternate way to get the list of keys in an object?
This is the data format I am using:
The text was updated successfully, but these errors were encountered:
I am trying to store data in my registers using
jsonDecode
/jsonEncode
. Once I decode my object I want to convert it to a Map by iterating over the object's keys. The only way I can see to do this is to useobject.class.fields
... but this seems to filter out numeric keys and the result is an empty array ([]
). My object is keyed by weapon and chip ID, which are numeric. Is there an alternate way to get the list of keys in an object?This is the data format I am using:
The text was updated successfully, but these errors were encountered: