Hi i want to merge two arrays. I have a table positions and candidates. The candidates table has a foreign key pos_id. This is the format that i want to achieve.
[
{
"position": {
"name": "",
"type": "",
"max": "",
"candidate": [
{
"name": ""
},
{
"name": ""
}
]
}
},
{