input: Write a python function to sort a list of objects by their 'name' attribute.
  assert sorted_by_name([{'name': 'Zoe'}, {'name': 'Alice'}, {'name': 'Bob'}]) == [{'name': 'Alice'}, {'name': 'Bob'}, {'name': 'Zoe'}]
  assert sorted_by_name([{'name': 'Tom'}, {'name': 'Jerry'}, {'name': 'Anna'}]) == [{'name': 'Anna'}, {'name': 'Jerry'}, {'name': 'Tom'}]
  assert sorted_by_name([{'name': 'apple'}, {'name': 'Banana'}, {'name': 'cherry'}]) == [{'name': 'Banana'}, {'name': 'apple'}, {'name': 'cherry'}]
output: def sorted_by_name(objects):
      return sorted(objects, key=lambda x: x['name'])