I have an object (stored as $videos) that looks like this
object(stdClass)#19 (3) { [0]=> object(stdClass)#20 (22) { [\"id\"]=> string(1) \
Correct:
$videos= (Array)$videos; $video = $videos[0];