github.com/GuanceCloud/cliutils@v1.1.21/pipeline/ptinput/funcs/md/delete.md (about) 1 ### `delete()` {#fn-delete} 2 3 函数原型:`fn delete(src: map[string]any, key: str)` 4 5 函数说明: 删除 JSON map 中的 key 6 7 ```python 8 9 # input 10 # {"a": "b", "b":[0, {"c": "d"}], "e": 1} 11 12 # script 13 j_map = load_json(_) 14 15 delete(j_map["b"][-1], "c") 16 17 delete(j_map, "a") 18 19 add_key("j_map", j_map) 20 21 # result: 22 # { 23 # "j_map": "{\"b\":[0,{}],\"e\":1}", 24 # } 25 ```