Does Groovy have object destructuring like Javascript?

Viewed 3345

Does Groovy have object destructuring with multiple assignments like Javascript:

let options = {
  title: "Menu",
  width: 100,
  height: 200
};

let {title, width, height} = options;

alert(title);  // Menu
alert(width);  // 100
alert(height); // 200
1 Answers
Related