code: def delete(self, obj):
          
          full = deepcopy(obj)
          frag = full
          parts, last = self.parts[:-1], self.parts[-1]
          for part in parts:
              if isinstance(frag, dict):
                  frag = frag[part]
              elif isinstance(frag, (list, tuple)):
                  frag = frag[int(part)]
  
          if isinstance(frag, dict):
              frag.pop(last)
          elif isinstance(frag, list):
              if last == '-':
                  frag.pop()
              else:
                  frag.pop(int(last))
  
          return full
docs: Returns
              object: full copy of new obj