I have a problem with a passing ruby code in javascript `script` tag

Now I have this code:

```
<script>
  var offer_foto = {
    slide_offer_preview_1: ['one.jpg', 'two.jpg', 'three.jpg'],
    slide_offer_preview_2: ['four.jpg', 'five.jpg', 'six.jpg']
  }
</script>

```

My Ruby code

```
<% for i in 0..@page[:proposals].count - 1 %>
  <%= @page[:proposals][i][:hotels][0]['hotel_images'].map{|f| f['url']} %>
<% end %>

```

In Javascript I need

```
slide_offer_preview_i: <%= @page[:proposals][i][:hotels][0]['hotel_images'].map{|f| f['url']} %>

```

Unfortunately I don't know how ti get it because I know Javascript not quite well. If you need more information please comment. Thanks!