I hope this isn't a stupid question. I'm new to working with JSON and am working with a config.js file that contains settings for a PWA. The config.js file contains some custom theming that users can input that looks like this:
"themes": [
{
"name": "Normal",
"enabled": true,
"colorSets": [
{
"type": "main",
"colors": {
"PrimaryColor": ...
}
},
...
]
},
{
"name": "Sepia",
"enabled": true,
"colorSets": [
{
"type": "main",
"colors": {
"PrimaryColor": ...
}
},
...
]
},
{
"name": "Dark",
"enabled": true,
"colorSets": [
{
"type": "main",
"colors": {
"PrimaryColor": ...
}
},
...
]
}
],
"defaultTheme": "Normal",
Say I need the primary color of theme "Normal", "Sepia", or "Dark". Is there a simple way to fetch the color object from that theme? Thanks :)