我有嵌套对象列表:
this.state = {
lst: [
{
id: "TKT4321",
subject: "abc",
reply: [
{ id: "TKT34343", subject: "axyz" },
]
},
{
id: "TKT34341",
subject: "aaaaa",
reply: [
{ id: "TKT322", subject: "abfjf" },
]
},
],
}
我想将对象附加到回复属性。例如
{
id: "TKT34341",
subject: "aaaaa",
reply: [
{ id: "TKT322", subject: "abfjf" },
{ id: "TK2222", subject: "jkjk" },
]
},
最好的方法是什么?请帮我 。