Hash remove all except specific keys

后端 未结 0 797
清歌不尽
清歌不尽 2021-02-11 12:03

I would like to remove every key from a hash except a given key.

For example:

{
 \"firstName\": \"John\",
 \"lastName\": \"Smith\",
 \"age\": 25,
 \"add         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题