【发布时间】:2020-12-08 05:35:50
【问题描述】:
{
"a": [
[
{
"_id": "57e55b64016c3551c025abc1",
"title": "Main Campus"
},
{
"_id": "5810e2e27064497f74ad4874",
"title": "Ahm Campus"
},
{
"_id": "5d5d2633a1d0680620ac3cce",
"title": "Baroda"
},
{
"_id": "5d5d3af3a1d0680620ac3ef8",
"title": "India"
}
],
[
{
"_id": "57e55b64016c3551c025abc1",
"title": "Main Campus"
},
{
"_id": "5810e2e27064497f74ad4874",
"title": "Ahm Campus"
},
{
"_id": "5d5d2633a1d0680620ac3cce",
"title": "Baroda"
},
{
"_id": "5d5d3af3a1d0680620ac3ef8",
"title": "India"
}
]
]
}
如何在领域(React Native)中为这种类型的 JSON 对象创建模式。我尝试了所有可能的方法,但没有找到任何具体的解决方案。基本上,它是一个嵌套数组,其中第二个数组没有任何特定的键(我尝试使用键它工作正常,但我想在不添加键的情况下这样做)。
【问题讨论】:
标签: reactjs mobile realm native