input: Write a python function to sort a list of objects by their age attribute.
  assert sortByAge([{'name': 'John', 'age': 25}, {'name': 'Jane', 'age': 22}, {'name': 'Doe', 'age': 30}]) == [{'name': 'Jane', 'age': 22}, {'name': 'John', 'age': 25}, {'name': 'Doe', 'age': 30}]
  assert sortByAge([{'name': 'Alice', 'age': 40}, {'name': 'Bob', 'age': 38}, {'name': 'Charlie', 'age': 45}]) == [{'name': 'Bob', 'age': 38}, {'name': 'Alice', 'age': 40}, {'name': 'Charlie', 'age': 45}]
  assert sortByAge([{'name': 'Emily', 'age': 28}, {'name': 'David', 'age': 22}, {'name': 'Frank', 'age': 25}]) == [{'name': 'David', 'age': 22}, {'name': 'Frank', 'age': 25}, {'name': 'Emily', 'age': 28}]
output: def sortByAge(objects):
      return sorted(objects, key=lambda x: x['age'])