0
我与格式化这样如何获得阵列进行阵列
[
[{
"ID": "f75d414d-55fc-43c8-a24d-34eca67913b7",
"Revision": "a8c73a24-d46a-47c8-825e-511b26485e23",
"type": "Hello",
"Stage": null,
"label": null,
},
{
"ID": "f75d414d-55fc-43c8-a24d-34eca67913b7",
"Revision": "a8c73a24-d46a-47c8-825e-511b26485e23",
"type": "world",
"Stage": null,
"label": null,
}]
]
阵列的工作,我需要转换到这个
[{
"ID": "f75d414d-55fc-43c8-a24d-34eca67913b7",
"Revision": "a8c73a24-d46a-47c8-825e-511b26485e23",
"type": "Hello",
"Stage": null,
"label": null,
},
{
"ID": "f75d414d-55fc-43c8-a24d-34eca67913b7",
"Revision": "a8c73a24-d46a-47c8-825e-511b26485e23",
"type": "world",
"Stage": null,
"label": null,
}]
通过保存的变量(原始数组)以某种方式。一个光滑的方式会很好。
只要做'arrayName = arrayName [0]' – tewathia
你基本上是问如何访问数组的第一个元素。这应该[由任何JavaScript教程覆盖](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Predefined_Core_Objects#Referring_to_Array_Elements)。 –
'var a = [[{ID:...},{ID:...}]] [0];' – RobG