def _get_field_value(field_to_get, object_to_search):
    """
    Gets the value of a nested object, for example, if we search
    'address.city.neighborhood' in the object:
    {'address':
        {'city':
            {'neighborhood': 'shapira'}
        }
    }
    The returned value will be 'shapira'

    :param field_to_get:
    :param object_to_search:
    :return (string): The value of the field that needs to be searched
    """
    field_parts = field_to_get.split('.')
    while len(field_parts) > 0:
        field_part = field_parts.pop(0)
        object_to_search = object_to_search.get(field_part, '')
    return object_to_search
