/**
 * This function takes a list of dictionaries as input and returns a list of keys that are common to all dictionaries.
 *
 * @param dictList A list of dictionaries.
 * @return A list of keys that are common to all dictionaries.
 */
fun findCommonKeys(dictList: List<Map<String, Any>>): List<String> {

    // Initialize the common keys list with all keys of the first dictionary
    var commonKeys = dictList[0].keys.toList()

    // Loop through the remaining dictionaries
    for (i in 1 until dictList.size) {
        // Create a new list to store the common keys for the current dictionary
        val currentKeys = mutableListOf<String>()

        // Loop through the keys of the first dictionary
        for (key in commonKeys) {
            // Check if the key exists in the current dictionary
            if (key in dictList[i]) {
                // Add the key to the current keys list
                currentKeys.add(key)
            }
        }

        // Update the common keys list with the current keys list
        commonKeys = currentKeys
    }

    return commonKeys
}
/**
 * This function takes a list of dictionaries as input and returns a list of keys that are common to all dictionaries.
 *
 * @param dictList A list of dictionaries.
 * @return A list of keys that are common to all dictionaries.
 */
fun findCommonKeys(dictList: List<Map<String, Any>>): List<String> {
/**
 * This function takes a list of dictionaries as input and returns a list of keys that are common to all dictionaries.
 *
 * @param dictList A list of dictionaries.
 * @return A list of keys that are common to all dictionaries.
 */
fun findCommonKeys(dictList: List<Map<String, Any>>): List<String> {

    // Initialize the common keys list with all keys of the first dictionary
    var commonKeys = dictList[0].keys.toList()

    // Loop through the remaining dictionaries
    for (i in 1 until dictList.size) {
        // Create a new list to store the common keys for the current dictionary
        val currentKeys = mutableListOf<String>()

        // Loop through the keys of the first dictionary
        for (key in commonKeys) {
            // Check if the key exists in the current dictionary
            if (key in dictList[i]) {
                // Add the key to the current keys list
                currentKeys.add(key)
            }
        }

        // Update the common keys list with the current keys list
        commonKeys = currentKeys
    }

    return commonKeys
}