Set a string
for the _serialize
option instead of an array
. An array
indicates that there might be multiple view vars that need to be serialized, and that requires them to be packed into separate object properties.
$this->set(array(
'platformusers' => $platformusers,
'_serialize' => 'platformusers'
));
That should give you the desired result.