I have the following JSON array i like to get datas
{
"data": {
"restriction_reason": {
"not_verified": true,
"using_vpn": false,
"banned_until": "2020-05-04T17:01:30.000Z",
"reason": "string"
},
"surveys": [
{
"id": "string",
"type": "survey",
"click_url": "https://api.aa.comc",
"cpi": "1.2",
"value": "120",
"loi": 5.3,
"country": "US",
"language": "en",
"rating": 4,
"category": {
"name": "Automotive",
"icon_name": "string",
"icon_url": "string",
"name_internal": "automotive"
},
"tags": [
"pii"
],
},{
"id": "string",
"type": "survey",
"click_url": "https://api.aba.comc",
"cpi": "1.2",
"value": "1220",
"loi": 5.3,
"country": "US",
"language": "en",
"rating": 4,
"category": {
"name": "Automotive",
"icon_name": "string",
"icon_url": "string",
"name_internal": "automotive"
},
"tags": [
"pii"
],
},
]
}
}
I get this response from Curl I like to extract somes items and add to another offers arrow
i need Survey id , survey value , survey click_url and catégory name
exemple :
**
$offers[] = array('survey_id' => $get_data["id"],
"survey_url" => $get_data["click_url"],
"survey_value" =>$get_data["value"]);
**
AFTER IF I CREATE offers[] i will encode and merge it with offers2[] (Another json) to get final json arrow