(self, field)
Get using dot notation
Get using dot notation
Get using dot notation
def get(self, field):
        """Get using dot notation"""
        nested_keys = field.split('.')
        tmp = self.data
        for i, key in enumerate(nested_keys):
            if key not in tmp:
                return None
            if i == len(nested_keys) - 1:
                return tmp[key]
            tmp = tmp[key]
def get ( self , field ) : nested_keys = field . split ( '.' ) tmp = self . data for i , key in enumerate ( nested_keys ) : if key not in tmp : return None if i == len ( nested_keys ) - 1 : return tmp [ key ] tmp = tmp [ key ]