cast obj as array