List within a list is not getting updated

Certified Associate Developer

I am trying to update name and age in variable X using Y data. Code below 

a!localVariables(
local!Y: {
a!map(id:1,name:"test1",age: "60"),
a!map(id:2,name:"test2",age:"70")

},
local!X: {
a!map(id: 1, person: {name:"test1",age:"50"}),      
a!map(id: 2, person: {name:"test2",age:"20"}),
a!map(id: 3, person: {name:"test3",age:"30"}),

},
{
a!buttonArrayLayout(
buttons: {
a!buttonWidget(
label: "Button",
style: "OUTLINE",
saveInto: a!save(
local!X,
a!update(
local!X,
{
wherecontains(
tointeger(local!Y.id),
tointeger(local!X.id)
)
},
{ local!Y}
)
)
)
},
align: "START",
marginBelow: "NONE"
)
}
)

But ended up getting this  , Can you please help me correct this, I only wanted to update the name and age inside person list for the id 1 and 2 

  Discussion posts and replies are publicly visible