X interview question

Develop a function to compare two hashmap content and return the result accordingly. It should not be dependent on the data type and comparsion should be generic.