How to destructure object properties with key names that are invalid variable names? January 21, 2023 by Tarik const data = { "key-with-dash": ["BAZ"] } const {"key-with-dash": foo} = data; console.log("foo", foo);