code: def update(target, path, value):
      
      names = path.split(".")
      names_length = len(names)
      node = target
      for index in range(names_length):
          name = names[index]
          if index == names_length - 1:
              last = True
          else:
              last = False
          if isinstance(node, dict):
              if last:
                  node[name] = value
                  return
              else:
                  if not name in node:
                      node[name] = {}
                  node = node[name]
          elif isinstance(node, list):
              name = int(name)
              listpad(node, name+1)
              if last:
                  node[name] = value
                  return
              else:
                  node[name] = {}
                  node = node[name]
          else:
              if last:
                  setattr(node, name, value)
              else:
                  setattr(node, name, {})
                  node = getattr(node, name)
docs: Update item in path of target with given value.