gpt4 book ai didi

javascript - 按键的前缀过滤 JavaScript 对象并减少以构建新对象

转载 作者:行者123 更新时间:2023-11-29 23:17:52 26 4
gpt4 key购买 nike

<分区>

我正在从一个大型数据转储 API 中提取数据,需要更好地过滤数据。目前,这是我所看到的示例。

{
AA-Short: "information",
AA-Long: "more information",
AA-Extra: "even more information",
BB-Short: "information",
BB-Long: "more information",
BB-Extra: "even more information",
}

我正在努力做到这一点:

{
AA: {
AA-Short: "information",
AA-Long: "more information",
AA-Extra: "even more information"
},
BB: {
BB-Short: "information",
BB-Long: "more information",
BB-Extra: "even more information"
}
}

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com