[{
"id":35,
"aktivis":{
"id":450,
"name":"A. Sri Nugroho Hadi",
"gender": "male",
"active_job":{
"id":491,
"id_aktivis":450,
"id_company":20,
"company":{
"id":20,
"name":"Company 1"
}
}
}
},
{
"id":36,
"aktivis":{
"id":451,
"name":"Sri ",
"gender": "female",
"active_job":{
"id":492,
"id_aktivis":451,
"id_company":21,
"company":{
"id":21,
"name":"compnay 2"
}
}
}
}]
so after my previous question and there is the anwser in Group and count values in an array
so it answer my question but then i get to the another problem that i didn't realize i did have. What if i want to show my array like this?
[{
"id":20,
"name":"Company 1"
"employee_count":1
"female":0
"male":1
},
{
"id":22,
"name":"Company 2"
"employee_count":1
"female":1
"male":0
}]