I want to add a nested array into Firestore but when I tried to Firestore gave the following error
Unhandled Exception: [cloud_firestore/unknown] Invalid data. Nested arrays are not supported
Here is JSON format which I want to to add to Firestore:
{
"time": "7:00pm",
"isSet": false,
"leds": [
[0, 0, 0, 0],
[0, 0, 0, 0],
[0, 0, 0, 0],
[0, 0, 0, 0],
[0, 0, 0, 0],
[0, 0, 0, 0],
[0, 0, 0, 0],
[0, 0, 0, 0],
[0, 0, 0, 0],
[0, 0, 0, 0],
[0, 0, 0, 0],
[0, 0, 0, 0],
[0, 0, 0, 0],
[0, 0, 0, 0],
[0, 0, 0, 0],
[0, 0, 0, 0],
[0, 0, 0, 0],
[0, 0, 0, 0],
[0, 0, 0, 0],
[0, 0, 0, 0],
]
}
Here is a Model Class Which I was using for passing data
class LampModes {
String name;
int index;
List<List<int>> leds;
LampModes(this.name, this.index, this.leds);
}
Is there any way to add a nested array into Firebase Firestore?