Hi @Alexis, welcome to the community
@BillAlex beat me to it since I had to answer the door , but let me post my suggestion anyway:
Since you specifically asked for a Function node, I think this snippet should do the job based on your example data:
return [{
json: {
stores: items[0].json.stores.map(s => { return {
name: s.name,
type: s.type
}
})
}
}];
Here is an example you can copy straight into your canvas: