[
{
personId: 1,
name: 'John',
surName: 'Sur',
bookId: 1,
bookName: 'Lord of the ring',
updated_at: 2022-01-24T19:20:53.742Z,
deliver__date: null
},
{
personId: 1,
name: 'John',
surName: 'Sur',
bookId: 2,
bookName: 'Fableheaven',
updated_at: 2022-01-24T19:21:57.813Z,
deliver__date: null
},
{
personId: 1,
name: 'John',
surName: 'Sur',
bookId: 3,
bookName: 'Some Book',
updated_at: 2022-01-24T19:21:57.813Z,
deliver__date: null
}
]
I wanna do this json data like this [{ personId:1 name:"John", surName:"Sur", lend:{..rest} }]
but I can't how can do this thanks for help for now.