/**
 * This function takes a list of animals as input and returns a new list containing the names of all animals.
 *
 * @param animals A list of animals
 * @return A list of animal names
 */
fun getAnimalNames(animals: List<Map<String, String>>): List<String> {

    val animalNames = mutableListOf<String>() // Initialize an empty list to store animal names

    // Iterate over each animal in the list
    for (animal in animals) {
        animalNames.add(animal["name"]!!) // Add the name of each animal to the new list
    }

    return animalNames
}
/**
 * This function takes a list of animals as input and returns a new list containing the names of all animals.
 *
 * @param animals A list of animals
 * @return A list of animal names
 */
fun getAnimalNames(animals: List<Map<String, String>>): List<String> {
/**
 * This function takes a list of animals as input and returns a new list containing the names of all animals.
 *
 * @param animals A list of animals
 * @return A list of animal names
 */
fun getAnimalNames(animals: List<Map<String, String>>): List<String> {

    val animalNames = mutableListOf<String>() // Initialize an empty list to store animal names

    // Iterate over each animal in the list
    for (animal in animals) {
        animalNames.add(animal["name"]!!) // Add the name of each animal to the new list
    }

    return animalNames
}