This is a flutter/dart question, in case you want to ask.
I have the following JSONObject:
{
"header": [
2223,
2224
],
"2223": {
"L": 3,
"A": 6,
"B": 5,
"Mode": 15,
},
"2224": {
"L": 9,
"A": 6,
"B": 1,
"Mode": 16,
}
}
First I load the 'table of contents' from the header object.
var tagsJson = jsonDecode(jsonContent)['header'];
List<String> timestamps = tagsJson != null ? List.from(tagsJson) : null;
And here is my Result Object I want to assign the values to
class Result {
double L;
double A;
double B;
int mode;
Result({this.L, this.A, this.B, this.mode});
void dump()
{
print(this.L);
print(this.A);
print(this.B);
print(this.mode);
}
}
How can I get those values of the timestamp JSONObjects, and assign them the corresponding Result Object using flutter?