A-M baby
This commit is contained in:
parent
764da6cbbb
commit
db842d013d
19005 changed files with 197040 additions and 7 deletions
8
Task/JSON/Groovy/json-2.groovy
Normal file
8
Task/JSON/Groovy/json-2.groovy
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
result.each { println it.key; it.value.each {person -> println person} }
|
||||
|
||||
assert result.people[0].name == [family:'Flintstone', given:'Frederick']
|
||||
assert result.people[4].age == 1
|
||||
assert result.people[2].relationships.wife == 'people[3]'
|
||||
assert result.people[3].name == [family:'Rubble', given:'Elisabeth']
|
||||
assert Eval.x(result, 'x.' + result.people[2].relationships.wife + '.name') == [family:'Rubble', given:'Elisabeth']
|
||||
assert Eval.x(result, 'x.' + result.people[1].relationships.husband + '.name') == [family:'Flintstone', given:'Frederick']
|
||||
Loading…
Add table
Add a link
Reference in a new issue