Changed formating of returned object to a tuple of dictionaries, now results can be iterated in PHP