 |
Subscribe to this site |
|
Learn Groovy 0

Published 9 months ago
by
Tyler
// http://docs.groovy-lang.org/next/html/documentation/working-with-collections.html
d = []
d << [name: "Tyler", interests: ["chess", "corgis", "beer"]]
d << [name: "Bhavik", interests: ["shoes", "beer", "edm"]]
d << [name: "Ben", interests: ["biking", "dogs", "frogs", "weird stuff"]]
// get a list of all the names
// get all the interests in a single list
// get all the interests in a single list (no dups)
// get the user with frogs as an interest
// get the the users whose name is 4 characters or longer
// make every person's name uppercase