[js] 第600天 与一个方法将origin转化为tree,要求支持无限级和性能 · Issue #3273 · haizlin/fe-interview · GitHub
Skip to content

[js] 第600天 与一个方法将origin转化为tree,要求支持无限级和性能 #3273

Description

@haizhilin2013

第600天 与一个方法将origin转化为tree,要求支持无限级和性能

3+1官网

我也要出题

const origin = {
  "a.b.c": "abc",
  "a.d.f.g": "adfg",
  "a.z": "az",
  "test": "test"
}

// 树结构对象
const tree = {
	a: {
		b: {
			c: "abc"
		},
		d: {
			f: {
				g:"adfg"
			}
		},
		z: "az"
	},
	"test": "test"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    jsJavaScript

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions