I have a doubt in Key-value pair object. I need to create a key value pair and then I need to update it.
Example: I have to create the following kind of object:
var itemval = {
Id:1{Name:aa,Idval:1},
Id:2{Name:bb,Idval:2},
Id:3{Name:cc,Idval:3},
Id:4{Name:dd,Idval:4}
}
During update I need to check the Id. If Id matches then add item in that section.
Below example Id is 1 so we are adding value in it.
var itemval = {
{Id:1{Name:aa,Idval:1},{Name:ee,Idval:5}},
Id:2{Name:bb,Idval:2},
Id:3{Name:cc,Idval:3},
Id:4{Name:dd,Idval:4}
}
This value I need to store it in SharePoint list column as JSON object using pnp.js.
Can someone assist me?
Thanks