need some help.
I have a json object and I want to create an string array with keys of the object.
json Object
{
"FEATURES": {
"APP_DASHBOARD": {
"MENU_TITLE": "Dashboard",
"HEAD_TITLE": "Dashboard",
"HEAD_DESC": "Welcome to briteplan"
},
"APP_TEAM": {
"MENU_TITLE": "Teams",
"HEAD_TITLE": "Teams",
"HEAD_DESC": "",
"TOOL_TIPS": {
"TEAM_REFRESH": "Refresh teams",
"TEAM_ADD": "Add new team",
"TEAM_EDIT": "Edit team",
"TEAM_REMOVE": "Remove team",
"MEMBER_REMOVE" : "Remove team member",
"MEMBER_LEAD" : "Team lead",
"AVL_MEMBERS_REFRESH" : "Refresh available members"
},
"CONTENT": {
"TEAMS_TITLE": "Teams",
"MEMBERS_TITLE": "Members",
"AVL_MEMBERS_TITLE": "Available team members"
}
}
},
"GENERAL": {
"SEARCH_PLACEHOLDER": "Search ..."
}
}
I would like to generate a array that looks like this:
var myArray = [
'FEATURES.APP_TEAM.MENU_TITLE',
'FEATURES.APP_TEAM.HEAD_TITLE',
'FEATURES.APP_TEAM.HEAD_DESC',
'FEATURES.APP_TEAM.TOOL_TIPS.TEAM_REFRESH',
'FEATURES.APP_TEAM.TOOL_TIPS.TEAM_ADD',
'FEATURES.APP_TEAM.TOOL_TIPS.TEAM_EDIT',
'FEATURES.APP_TEAM.TOOL_TIPS.TEAM_REMOVE',
];
Not all values is included, but I think you get the Idea. The main thing is I Will know the I have "FEATURES" in the object and I will know the feature name "APP_TEAM", but I don't know the nesting level within that feature.
Hope anyone can help me.