Say I have an object with a shape like so:
{
rows: [
{some: fields,
go: here}]
}
, and say that, in a particular case, I knew that the length of rows is 1. How could I extract {some: fields, go: here} through destructuring?
I have attempted: {rows: [stuff]}
, and {rows: stuff}
but in both cases console.log(stuff)
prints [{some: fields, go: here}]
How can I do this through destructuring?