1
Reply

JOSN Filter

Akash Patil

Akash Patil

Nov 18 2015 5:34 AM
626
hello Experts,
 
i am new in angularjs  i have following JSON data
$scope.countries = {
'India': {
'Maharashtra': ['Pune', 'Mumbai', 'Nagpur', 'Akola'],
'Madhya Pradesh': ['Indore', 'Bhopal', 'Jabalpur'],
'Rajasthan': ['Jaipur', 'Ajmer', 'Jodhpur']
},
'USA': {
'Alabama': ['Montgomery', 'Birmingham'],
'California': ['Sacramento', 'Fremont'],
'Illinois': ['Springfield', 'Chicago']
},
'Australia': {
'New South Wales': ['Sydney'],
'Victoria': ['Melbourne']
}
};
 
i want only list of country, only list of States
 
ng-options="country for (country, states) in countries" by using this i got whole JSON data..i want only list of country, only list of States.
 
please help...thank u 

Answers (1)