Bracket notation reads a property whose name is stored in another value. Put that property-name value inside square brackets.
const person = { name: "Mira", age: 20 };
const field = "name";
console.log(person[field]);Use selectedSetting to read the matching property from settings, then display Setting: dark. Do not write .theme.
A variable holding a key needs different access from a fixed property name.