Added a function for getting values by key from objects.