Hi,
You can check my written article about
Basics of JavaScript Symbols[
^]
I think you need to have the reference to the symbol in order for you to get the value.
Here are the steps:
1. Get the reference.
Note: Just make sure about the index.
e.g.
let symbol = Object.getOwnPropertySymbols(object)[0];
2. Once you have the reference, you can use that reference as a token property.
e.g.
object[symbol];
console.log(object[symbol]);
If you are still confused, you can reference the example below.
const fruits = { [Symbol("myFruits")] : { favorite: true, color: "yellow", name: "mango"} };
let symbolReference = Object.getOwnPropertySymbols(fruits)[0];
console.log(fruits[symbolReference]);
I hope this helps you out.
Cheers,
Jin