Open grimmdude opened 7 years ago
Actually, even iterating over $lists->{0}
doesn't seem to work as expected. If there is only one list this will be a flat object, not an array with a single object in it.
Last message I promise.
Just realized $lists->{0}
will always only return one item, but according to the API docs (http://www.activecampaign.com/api/example.php?call=list_list) property0
is an array. 😕
-Garrett
It would be helpful if the response object implemented an iterator interface when the data includes an array so that something like this would work as expected:
Intuitively that would just iterate through the lists, but currently it includes all visible properties of the object so you can't really use it like that. I realize that iterating over
$lists->{0}
will work instead, but just thought I would suggest this improvement. Thanks!-Garrett