【问题标题】:DynamicObject<JSArray>@31160c66' cannot be passed from one context to anotherDynamicObject<JSArray>@31160c66\' 无法从一个上下文传递到另一个上下文
【发布时间】:2022-12-07 20:33:17
【问题描述】:

尝试将数组(从 JSON.parse)传递给普通数组时出错

“DynamicObject@31160c66”不能从一个上下文传递到另一个上下文。当前上下文是 0x76a5839d,参数值来自上下文 0x5a09aee1。

还尝试使用 Array.from 方法。

两个数组相等

【问题讨论】:

  • 请阐明您的具体问题或提供更多详细信息以准确突出您的需求。正如目前所写的那样,很难准确地说出你在问什么。

标签: javascript arrays json


【解决方案1】:

JSON 有额外的括号 [ ],必须删除额外的 [] 并将其转换为数组。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-02-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多