如何编辑JSON数组?
我想更改数组中的所有元素,删除我不需要的键,并为简单起见将名称变成键。你怎么做? 是否有一个简单的软件或网站,您可以在其中以这种方式编辑JSON数组?
我的意思是我想把这样的东西变成
"一": {
"strokes": 1,
"grade": 1,
"freq": 2
},
"二": {
"strokes": 2,
"grade": 1,
"freq": 9
}
这样的东西:
{
"symbol":"一",
"strokes": 1,
"grade": 1
},
{
"symbol": 二,
"strokes": 2,
"grade": 1
}
是的,您用什么工具来做类似的事情?
I want to change all elements in the array, deleting keys I do not need and also turning the names into keys for simplicity. How do you go about that?
Is there a simple piece of software or a website where you can edit JSON arrays in that manner?
What I mean is that I want to turn something like this:
"一": {
"strokes": 1,
"grade": 1,
"freq": 2
},
"二": {
"strokes": 2,
"grade": 1,
"freq": 9
}
Into something like this:
{
"symbol":"一",
"strokes": 1,
"grade": 1
},
{
"symbol": 二,
"strokes": 2,
"grade": 1
}
So yeah, what tool do you use to do something like that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您要推荐推荐工具,那么问题是堆栈溢出的主题。
可以在一个JavaScript语句中轻松完成,因此这是您的工具:
If you're asking to recommend a tool, then the question is off-topic for Stack Overflow.
It can easily be done in one JavaScript statement though, so here's your tool: