Groovy web console

subscribe to the feed Subscribe
to this
site

Learn Groovy 0

Published 2 months ago by Tyler
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
// 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