/**
 * This function takes in two dictionaries and returns a new dictionary that contains only the common keys
 * present in both dictionaries and their corresponding values. It uses the OR operator to find the intersection.
 *
 * @param dictionary1 The first input dictionary.
 * @param dictionary2 The second input dictionary.
 * @return A new dictionary containing the intersection of the two input dictionaries.
 */
fun getOrOperatorIntersect(dictionary1: Map<String, Any>, dictionary2: Map<String, Any>): Map<String, Any> {

    val intersect = mutableMapOf<String, Any>()

    // Using mapOf and filterKeys with OR operator
    intersect.putAll(dictionary1.filterKeys { it in dictionary2 } + dictionary2.filterKeys { it in dictionary1 })

    return intersect
}
/**
 * This function takes in two dictionaries and returns a new dictionary that contains only the common keys
 * present in both dictionaries and their corresponding values. It uses the OR operator to find the intersection.
 *
 * @param dictionary1 The first input dictionary.
 * @param dictionary2 The second input dictionary.
 * @return A new dictionary containing the intersection of the two input dictionaries.
 */
fun getOrOperatorIntersect(dictionary1: Map<String, Any>, dictionary2: Map<String, Any>): Map<String, Any> {
/**
 * This function takes in two dictionaries and returns a new dictionary that contains only the common keys
 * present in both dictionaries and their corresponding values. It uses the OR operator to find the intersection.
 *
 * @param dictionary1 The first input dictionary.
 * @param dictionary2 The second input dictionary.
 * @return A new dictionary containing the intersection of the two input dictionaries.
 */
fun getOrOperatorIntersect(dictionary1: Map<String, Any>, dictionary2: Map<String, Any>): Map<String, Any> {

    val intersect = mutableMapOf<String, Any>()

    // Using mapOf and filterKeys with OR operator
    intersect.putAll(dictionary1.filterKeys { it in dictionary2 } + dictionary2.filterKeys { it in dictionary1 })

    return intersect
}