Unable to display data in Selectize JS from remote source via R Shiny

Problem

I’m trying to query a aws cloudsearch endpoint from R Shiny using selectize input, but I am having no luck. Cloudsearch returns additional information that is not necessary for selectize, below is the full object returning 3 rows worth of results. I’m trying to return fields in my selectize drop down.

Data (json object)

{
    "status": {
        "rid": "4YG+neovoAIK1BX3",
        "time-ms": 2
    },
    "hits": {
        "found": 3,
        "start": 0,
        "hit": [
            {
                "id": "equities.csv_3",
                "fields": {
                    "function": "table",
                    "name": "PFIZER INC",
                    "type": "equity",
                    "dataset": "clinicals",
                    "ticker": "PFE"
                }
            },
            {
                "id": "equities.csv_5",
                "fields": {
                    "function": "table",
                    "name": "AMGEN INC",
                    "type": "equity",
                    "dataset": "clinicals",
                    "ticker": "AMGN"
                }
            },
            {
                "id": "equities.csv_6",
                "fields": {
                    "function": "table",
                    "name": "GILEAD SCIENCES INC",
                    "type": "equity",
                    "dataset": "clinicals",
                    "ticker": "GILD"
                }
            }
        ]
    }
}

What I Don’t Get

I can confirm that the issue is not coming from my cloudsearch endpoint, the below shiny app returns all of the specified data in the console. My expectation was that I could remove console.log(res.hits.hit[i].fields) within the below for loop of my success function and replace it with callback(res.hits.hit[i].fields) to get my results. That did not work, so I then tried removing my for loop and just returning callback(res.hits.hit[0].fields) with the expectation I’d at least return the first element, but that did not work either.

Shiny App (code blocks above reference changes in the success function of Ajax call)

library(shiny)

ui <- basicPage(
  tagList(
    selectizeInput('github', 'Select a Github repo', choices = '', options = list(
      valueField = 'ticker',
      labelField = 'ticker',
      searchField = 'ticker',
      options = list(),
      create = FALSE,
      render = I("{
      option: function(item, escape) {
        return '<div>' + escape(item.ticker) + '</div>';
      }
    }"),
      load = I("function(query, callback) {
      if (!query.length) return callback();
      $.ajax({
        url: 'cloud-search-endpoint' + encodeURIComponent(query),
        type: 'GET',
        dataType: 'json',
        error: function() {
          callback();
        },
        success: function(res) {
          console.log(res);
          console.log(res.hits.hit[0].fields);
          for (var i in res.hits.hit) {
             console.log(res.hits.hit[i].fields)
          }
        }
      });
    }")
    )),

    h3("Parsed query string")
  )
)



server <- function(input, output, session) {
  
}

shinyApp(ui, server)