Update the function fetchWeatherForCities
that accepts two parameters, an array of city names and a callback function. The task is to simulate fetching weather data with a delay of 2 seconds for each city.
The weather data for each city should be fetched from a predefined array of objects, where each object contains the city name and its corresponding weather information. The search should be case-insensitive, meaning cities like Kochi and kochi should both match the same entry in the database. However, the output should maintain the original casing of the city name as stored in the database.
While fetching data for each city, log the message Fetching data for <city>. to the console. If the weather data for a city is available in the database, include it in the final result.
Once all weather data has been fetched, the callback function should be called with an object where the keys are city names and the values are the corresponding weather data or the message Weather data not available. for cities that are missing in the database.