gpt4 book ai didi

javascript - 如何按数组元素过滤集合

转载 作者:行者123 更新时间:2023-11-30 14:58:01 25 4
gpt4 key购买 nike

<分区>

我有以下格式的数组

"categories": [
{
"type": "A",
"subtype": [
"X",
"Y",
"Z",
"D",
"E"
],

},
{
"type": "B",
"Subtypes": [
"0",
"1",
"2",
"3",
"4",
"5"
],
},
{
"type": "C",
"includeConnectionTypes": [
"@",
"#",
"$"
],
}]

我有第二个数组数组 B

B = ["C","A"]

现在如何根据数组B中的元素过滤类别数组中的元素

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