OLD | NEW |
| (Empty) |
1 import 'dart:html'; | |
2 | |
3 import 'package:js_util/js_util.dart'; | |
4 | |
5 void main() { | |
6 final jsObj = toJS({ | |
7 'people': [ | |
8 {'firstName': 'Kwang Yul', 'lastName': 'Seo'}, | |
9 {'firstName': 'DoHyung', 'lastName': 'Kim'}, | |
10 {'firstName': 'Kyusun', 'lastName': 'Kim'} | |
11 ] | |
12 }); | |
13 | |
14 final people = getValue(jsObj, 'people'); | |
15 final firstPerson = people[0]; | |
16 final text = | |
17 '${getValue(firstPerson, "firstName")} ${getValue(firstPerson, "lastName")
}'; | |
18 document.querySelector('#container').innerHtml = text; | |
19 } | |
20 | |
OLD | NEW |