I have an object:
let obj = { rows: [1, 2] }
How can I do ES6 array destructuring with assignment for value 1?
For the array itself I can do like that, but I don't know how to get the first value:
let {rows: [first] } = obj
first // 1
Sorry, all is working in my example, was confused by error in my console.log test
bis1there, not[1,2].