comparison based on array keys and difference is the output