tidwall / sjson

Set JSON values very quickly in Go
MIT License
2.4k stars 165 forks source link

how to delete all element keys for a map field? #65

Open elvizlai opened 1 year ago

elvizlai commented 1 year ago

Purpose

a :=  `{"records": {"1":{"id":"1","name":"a"},"2":{"id":"2","name":"b"}}}`

Delete(a, `records.*.id`)

should became:
{"records": {"1":{"name":"a"},"2":{"name":"b"}}}

but this records.*.id can not work.