updateNodeName () {
    const count = this.childs ? this.childs.length : 0
    let nodeName
    if (this.type === 'object' || this.type === 'array') {
      if (this.editor.options.onNodeName) {
        try {
          const getValue = this.getValue.bind(this)
          nodeName = this.editor.options.onNodeName({
            path: this.getPath(),
            size: count,
            type: this.type,
            get value () {
              return getValue()
            }
          })
        } catch (err) {
          console.error('Error in onNodeName callback: ', err)
        }
      }

      this.dom.value.textContent = (this.type === 'object')
        ? ('{' + (nodeName || count) + '}')
        : ('[' + (nodeName || count) + ']')
    }
  }
update the object name according to the callback onNodeName
@private