Adding elements to object

前端 未结 17 2173
有刺的猬
有刺的猬 2020-12-02 04:11

I need to populate a json file, now I have something like this:

{\"element\":{\"id\":10,\"quantity\":1}}

And I need to add another \"elemen

17条回答
  •  春和景丽
    2020-12-02 04:33

    if you not design to do loop with in JS e.g. pass to PHP to do loop for you

    let decision = {}
    decision[code+'#'+row] = event.target.value
    

    this concept may help a bit

提交回复
热议问题