Cara melewati peta dari controller ke fungsi javascript di halaman vf

public String getButtonNameMap() {
  Map<String, Id> buttonNameMap = new Map<String, Id>();
  for(LiveChatButton chatButton:[SELECT DeveloperName FROM LiveChatButton WHERE DeveloperName =:buttonNamesSet LIMIT :Limits.getLimitQueryRows() - Limits.getQueryRows()] ) {
    buttonNameMap.put(chatButton.DeveloperName,chatButton.Id); 
   }
   return JSON.serialize(buttonNameMap);
}
Thoughtless Teira