I need to iterate through an object that has Symbols for keys. The following code returns an empty array.
const FOO = Symbol(\'foo\');
const BAR = Symbol(\'b
You can iterate over all the keys of Object (String and Symbol keys) with
Reflect.ownKeys()
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/ownKeys
Object.values
only gets the values of all enumerable named (string-keys) properties.
You need to use Object.getOwnPropertySymbols:
console.log(Object.getOwnPropertySymbols(obj).map(s => obj[s]))