I have some excel files. I want to convert them to JS Objects. I can convert as Json like below.
{ "profileMenu.info": "Profile information",
"profileMenu.infos.generalInfo": "general information",
"profileMenu.infos.otherInfos": "Other information" }
I need to convert them like this.
profileMenu: {
info: 'Profile information',
infos: {
generalInfo: 'general information',
otherInfos: 'Other information',
}
I have searched for ways to do this but couldn't find any. Can you please help me on how to convert this Json to JS Objects?
{ profileMenu.info: "Информация о профиле",that is no valid JSON. In JSON keys have to be enclosed in double-quotes. Besides that, if you have something asJSONencoded string, you can just copy and past it into JS code and use it as a JavaScript Object. Data encoded as JSON is a valid representation of a JavaScript Object in JS code.