我似乎找不到答案,如何将数组中的数组更改为数组中的对象..??
在 javaScript 中解决这个问题。如何转换?如何转换?
我有这个数组。
[
"or",
[
"or",
{
"status": 1
},
{
"verified": 1
}
],
[
"and",
{
"social_account": 1
},
{
"enable_social": 1
}
]
]
我想要这个对象:
{
"or": [
{
"or": [
{
"status": 1
},
{
"verified": 1
}
]
},
{
"and": [
{
"social_account": 1
},
{
"enable_social": 1
}
]
}
]
}
回首忆惘然
相关分类