I have one select query in Objections JS(NodeJs). That will return few fields. I need to modify the result. Suppose we have got below json from the response of the query.
{
group_id,
group_name,
link,
created,
user_id
}
I need to update this response like below with the use of the loop of the.
{
group: {
id,
name,
},
link,
created,
user_id
}
Is there any option in objections to updating our result like this? Please help me with this concern.