I have this return from an API:
object(stdClass)[2]
public 'data' =>
object(stdClass)[44]
public 'id' => float 3.5795374673835E+14
public 'completed' => boolean false
public 'name' => string 'Dia dos Namorados' (length=17)
And I would like to count how many projects are with the completed => true
key, how can I do that?
Example:
if ( $objeto->completed == true )
{
$contar++;
}