I have the list data like this
void main() {
var animals = [
{
"0": ["cow", "chicken", "Fish"]
},
{
"1": ["lamb", "Camel"]
},
{
"2": ["Goat", "Cat"]
}
];
print(animals.length);
for (var a in animals) {
for (final x in a.entries){
print (x.value)}
}
}
but I want to get data to become like this:
1. cow
2. chicken
3. fish
1. lamb
2. camel
1. goat
2. cat
So, what can I do to get the output? Thank you I have tried to use join, but it is just for making a new line. not get the index.
Using x.value.join("\n")

