tidwall / sjson

Set JSON values very quickly in Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how to delete all element keys for a map field?

elvizlai opened this issue · comments

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.