Código:
lo que n ecesito que haga es que filtre los devices con nombre Android Panel o que el producto sea Pataforma web y me imprima en pantalla los dispositivos que no estan en el segundo array en este caso seria el device con id: 281256712 $devices1 = [ {"id":281252492,"name":"Android Panel","product":"Android Panel","version":"10.6.7","lastSeenAt":"Last seen: 2019-06-09"}, {"id":281258555,"name":"ONEPLUS A5000","product":"Android","version":"7.16.0.10517","lastSeenAt":"Last seen: 2019-06-08"}, {"id":281258334,"name":"Galaxy S7","product":"Android","version":"7.16.1.10610","lastSeenAt":"Last seen: 2019-06-08"}, {"id":281257970,"name":"Chrome","product":"Plataforma Web","version":"3.102.0","lastSeenAt":"Last seen: 2019-06-08"}, {"id":281256712,"name":"herr","product":"Android","version":"7.16.1.10610","lastSeenAt":"Last seen: 2019-06-08"}, {"id":275309414,"name":"Firefox","product":"Plataforma Web","version":"3.102.0","lastSeenAt":"Last seen: 2019-06-08"} ]; $devices2 = [ {"_id":"5cfc14bd32ca560017c8f2e1","cuenta":"48-1-PHQ7PVBR","idDevice":"281258334","deviceName":"Galaxy S7","product":"Android","idUsuario":{"_id":"5cfbc901a0e3d1001774985e","nombre":"fussion"},"idServerAccount":"5cfc0de532ca560017c8f2e0","dealerId":"48","dealerName":"root","__v":0}, {"_id":"5cfc14f832ca560017c8f2e2","cuenta":"48-1-NRNF7MRM","idDevice":"281258555","deviceName":"ONEPLUS A5000","product":"Android","idUsuario":{"_id":"5cfbc901a0e3d1001774985e","nombre":"fussion"},"idServerAccount":"5cfc0de532ca560017c8f2e0","dealerId":"48","dealerName":"root","__v":0} ]; foreach($devices1 as $device1){ if ($device1->name == 'Android Panel' || $device1->product == 'Plataforma Web') { continue; } $encontrado = false; foreach ($devices2 as $device2) { if ($device2->idDevice == $device1->id) { $encontrado = true; return $encontrado; } } if ($encontrado == false) { echo 'Dispositivo identificado ID: '.$device1->id.' | '.$device1->name.' | '.$device1->product.'<br>'; } }