I have the following javascript object that represents columns of a table that I want user can select to show and analyze based on his/her selection.
var nominalVars = {
state : 'State',
messoreg : 'Messoreg',
reggeoint : 'RegGeoInt',
reggeoimd : 'RegGeoImed',
microreg : 'Microreg',
regmetro : 'RegMetro',
city : 'City',
tipdepe : 'TipDep',
nvldepe : 'NvlDepe',
prefix : 'Prefix',
subord : 'Subord'
};
What I need is to retrieve all the properties bellow the last checkbox checked, e.g., If the user selects [state] checkbox, then I want to get [messoreg], [reggeoint], [reggeoimd], [microreg], etc. and them passing the values to an Array.
I don't know if there is it another way to do that but I'm trying to avoid using Swith of If statements.