配列からテキスト フィールドに値を読み取る jQuery 関数があります。ただし、配列のゼロ位置をテキスト フィールドに読み込むのに問題があります。
$(function(){
var values = ['one', 'two', 'three'];
$('#room').val(values[0].text()); // not sure about this statement
});
これは私のhtmlコードです
<input id="room" />