Created
October 18, 2020 11:05
-
-
Save code-simple/8952d070ef7400c900edb992314e22a1 to your computer and use it in GitHub Desktop.
How to use For Loop in Nested Map
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// How to use For Loop in Nested Map | |
void main() { | |
var people = {1: {'Name': 'John', 'Age': '27', 'Sex': 'Male'}, | |
2: {'Name': 'Marie', 'Age': '22', 'Sex': 'Female'}}; | |
for(int i=1;i<=people.length;i++){ | |
print('\nPerson ID: ${i}'); | |
people[i].forEach((k,v)=>print('$k : $v')); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment