有如下一段代码,如果想向数组中的指定位置插入数据,该如何写代码? 求教。 比如向 第一个数组后,插入一条 "order":"2"的数据。 现在插入数据,只能向数组的最末尾插入一条。
愿意有偿求帮助
"allContent": [
{
"order": "1",
"startTime": "00:00:00,666",
"endTime": "00:00:02,699",
"dxtSentenceContent": "hi大家好欢迎继续回来我们继续学习",
"dxtSentenceId": "94c66cd0-6c0d-4655-9198-cb88a7cfdc5d",
"dxtSentenceword": "222"
},
{
"order": "2",
"startTime": "00:00:02,700",
"endTime": "00:00:03,466",
"dxtSentenceContent": "在上节课呢",
"dxtSentenceId": "539cf901-755e-4525-a3e9-fffe93f39cfe"
},
{
"order": "3",
"startTime": "00:00:03,466",
"endTime": "00:00:04,599",
"dxtSentenceContent": "我们使用Istro builder呢",
"dxtSentenceId": "6a34c519-422e-430f-9222-285b0abbb19e"
},
推朋App (作者)
感谢回复! 我先收藏!
2023-03-07 22:04