Having this array of objects containing nested arrays:
let arr = [{
name: "aaa",
inputs: [{
inputName: "input-1",
groups: [{
groupName: "group-a"
}]
}]
}, {
name: "bbb",
inputs: [{
inputName: "input-2",
groups: [{
groupName: "group-b"
}]
}]
}];
How to map it and return an array of strings containing the groupName value, like this:
['group-a', 'group-b']