增加抽取slice索引的方法

This commit is contained in:
2021-03-11 22:12:14 +08:00
parent 35041c9133
commit ade8a4f26e
2 changed files with 46 additions and 7 deletions

View File

@ -14,6 +14,7 @@ import (
func TestJSON(t *testing.T) {
tree := NewDynamicJSON()
fmt.Println(tree.extraSliceIndex("[200]"))
tree.SetValue("extra.height.value", 180)
tree.SetValue("extra.height.unit.use", "cm")
tree.SetValue("extra.height.unit.open", "1")