select('notes', 'noteid', ['ownerid' => getRequestUser()->getUID()]); $notes = []; foreach ($noteids as $n) { $notes[] = Note::loadNote($n)->toArray(); } exitWithJson(["status" => "OK", "notes" => $notes]);