Write a function mergeObjects(obj1, obj2) that merges these two objects.
Treat both inputs as JSON-like dictionaries. Merge nested dictionaries recursively, let values from obj2 override conflicting values, replace arrays and primitive values directly, and do not mutate either input. Return a new dictionary.
Function signature: mergeObjects(obj1, obj2) Inputs and output are dictionaries containing nested dictionaries, arrays, strings, numbers, booleans, or None.
def mergeObjects(obj1, obj2):