Editable Grid select save of data formate of data not in formate of id

i am trying to save the selected data into some local variable but it was saving as id

i need full data to be save in the local or RI

this is my code:

a!localVariables(
local!items: {
a!map(id: 1, firstName: "John"),
a!map(id: 2, firstName: "Michael"),
a!map(id: 3, firstName: "Mary")
},
local!selectedReport,
local!data,

a!gridLayout(
headerCells: {
a!gridLayoutHeaderCell(label: "Summary"),
a!gridLayoutHeaderCell(label: "Qty", align: "RIGHT"),

},
columnConfigs: {
a!gridLayoutColumnConfig(width: "DISTRIBUTE", weight: 5),
a!gridLayoutColumnConfig(width: "DISTRIBUTE"),

},
rows: a!forEach(
items: local!items,
expression: {
a!gridRowLayout(
id: fv!index,
contents: {
a!textField(
/* Labels are not visible in grid cells but are necessary to meet accessibility requirements */
label: "summary " & fv!index,
value: fv!item.firstName,
readOnly: true
),
a!integerField(
value: fv!item.id,
readOnly: true,
align: "RIGHT"
),

}
)
}
),
selectable: true,
selectionValue: local!data,
/* Flatten the selected values so the result is easier to work with */
/* when the select/deselect all option is used in an editable grid */
selectionSaveInto: {
local!data,
if(
count(local!data) = count(local!items),
a!save(local!data, 1),
if(
count(local!data) > 1,
local!data << ldrop(local!data, 1),
{}
)
)
}
),


)

  Discussion posts and replies are publicly visible