I need some help. I have this result below in the call of Facebook's Api campaigns. In the actions part, how do I write to the database only the part action_type: comment?
{
"data": [
{
"adsets": {
"data": [
{
"name": "Teste adsets",
"ads": {
"data": [
{
"name": "Teste ads",
"insights": {
"data": [
{
"actions": [
{
"action_type": "comment",
"value": "8"
},
{
"action_type": "like",
"value": "79"
},
{
"action_type": "post",
"value": "5"
},
{
"action_type": "post_reaction",
"value": "331"
},
{
"action_type": "video_view",
"value": "35659"
},
{
"action_type": "page_engagement",
"value": "36082"
},
{
"action_type": "post_engagement",
"value": "36003"
}
],
"date_start": "2017-11-01",
"date_stop": "2017-11-30"
}
],
"paging": {
"cursors": {
"before": "teste",
"after": "teste"
}
}
},
}
],
"paging": {
"cursors": {
"before": "fadasdasfsdfçasdddasf,sdlf",
"after": "fdspkfsdjfksdjfksdjfksdjfsd"
}
}
},
},
{
"name": "Teste 1 adsets",
"ads": {
"data": [
{
"name": "Teste 1 ads",
"insights": {
"data": [
{
"actions": [
{
"action_type": "like",
"value": "7"
},
{
"action_type": "post",
"value": "1"
},
{
"action_type": "post_reaction",
"value": "61"
},
{
"action_type": "video_view",
"value": "8295"
},
{
"action_type": "page_engagement",
"value": "8364"
},
{
"action_type": "post_engagement",
"value": "8357"
}
],
"date_start": "2017-11-01",
"date_stop": "2017-11-30"
}
],
"paging": {
"cursors": {
"before": "rsadas",
"after": "dasadas"
}
}
},
}
],
"paging": {
"cursors": {
"before": "cfksjdkfjsdkfjsdfsd",
"after": "fsdfsdfsdfsdfsd"
}
}
},
},