Hello friends! I'm seeking assistance since I'm a beginner in the world of Angular and TypeScript.
export class TopPage implements OnInit {
//city = localStorage.getItem('city');
city = 'bangalore';
areas_array = {
"bangalore": ['one', 'two'],
"chennai": ['four', 'five'],
"hyderabad": ['six', 'seven']
};
area;
}
if (city === areas_array) {
//areas that matches the city
}
I am looking to retrieve the array within the areas_array that corresponds with the city. Also, is this the correct way to structure the areas_array?