on my current project I have a variables.js which contains all variables like theme colors.
I want to put this complete variables.js into a Database but its rly long, and I would prefer to put it into the database as a string to keep it easy for upcomming changes.
Is there any way, to make that this string which looks like the example down below get converted into a object that would work exactly like that down below.
Here a example whats inside the variables.js
export default {
faq_size : 5,
debug_show_php_errors : true,
debug_disable_captcha : false,
discord_color : "#7289DA",
theme : {primary: "deep-purple darken-4", secondary: "deep-purple accent-1",},
currencies : ["€", "$", "₽", "£", "¥"],
languages : [
{
lang : 'en',
code : 'US',
country: 'English',
},
{
lang : 'de',
code : 'DE',
country: 'Deutsch',
}
],
}