Here is the $object
that Microsoft is returning to me:
object(Microsoft\Graph\Model\Event)#56 (1) {
["_propDict":protected]=>
array(2) {
["@odata.context"]=>
string(245) "https://graph.microsoft.com/v1.0/$metadata#users('email%40outlook.com')/calendars('AAAAAAAAAAAAAAAAAAAAAAAA')/calendarView"
["value"]=>
array(0) {
}
}
}
I'm trying to check if value
's array contains nothing in it. I'm having trouble accessing "value" as it just says array. Here is what I've already tried doing:
$object->array;
$object->array();
$object[0];
foreach ($object as $key) {
var_dump($key);
}
None of those work.
I'm trying to do something like this:
if(empty($object->array['value'])) {
echo 'value is empty';
}
Entity.getProperties()
function could be utilized for that purpose which returns the list of properties.Entity
is a base class forEvent
entity.The following example demonstrates how to determine whether entity contains property using
array_key_exists
function: