JSFiddle - React, Tailwind, and code Playground

JavaScript

var Locations = {
  count: 0,
  location: [],
  processData: function(data) {
    console.log('test');
  },
  getData: function() {
    'use strict';
    let _this = this;
    jQuery.ajax({
      type: 'get',
      url: '/echo/json/',
      dataType: 'json',
      success: function(data) {
        _this.processData(data);
      }
    });
  }
};

Locations.getData();