<commit_before>﻿function Company(data) {
    this.Id = JSON.parse(data.Id);
    this.Name = JSON.parse(data.Name);
    this.Address = JSON.parse(data.Address);
    this.Industry = JSON.parse(data.Industry);
    this.City = JSON.parse(data.City);
    //this.contacts = JSON.parse(data.contacts);
}

function CompanyList(company, cityId) {
    var newCompany = new Company(company);
    $("#" + cityId).append('<div id="' + newCompany.Id + '"class="company-div col-xs-10 col-sm-6 col-sm-offset-4">' +
                                '<button type="button" class="company-button btn btn-primary">' + newCompany.Name + '</button>' +
                            '</div>');
};


function GetCompanyAjax(city) {
    var url = "../Company/GetCompanies/";

    $.ajax({
        type: "GET",
        url: url,
        data: { 'id': city },
        dataType: "json",
        success: function (companies) {
            for (var i = 0; i < companies.length; i++) {
                CompanyList(companies[i], city);
            }
        },
        error: function () {
            alert: ("Error: There was a problem listing the companies in this city.");
        }
    });
}<commit_msg>JavaScript Company object now working. Object properties display in DOM menu. Ready for merge to master.<commit_after>﻿function Company(company) {
    this.Id = JSON.parse(company.Id);
    this.Name = company.Name;
    //this.Address = JSON.parse(company.Address);
    //this.Industry = JSON.parse(company.Industry);
    //this.City = JSON.parse(data.City);
    //this.contacts = JSON.parse(data.contacts);
}

function CompanyList(company, cityId) {
    var data = new Company(company);
    console.log(data.Name);
    $("#" + cityId).append('<div id="' + data.Id + '"class="company-div col-xs-10 col-sm-6 col-sm-offset-4">' +
                                '<button type="button" class="company-button btn btn-primary">' + data.Name + '</button>' +
                            '</div>');
};


function GetCompanyAjax(city) {
    var url = "../Company/GetCompanies/";

    $.ajax({
        type: "GET",
        url: url,
        data: { 'id': city },
        dataType: "json",
        success: function (companies) {
            for (var i = 0; i < companies.length; i++) {
                CompanyList(companies[i], city);
            }
        },
        error: function () {
            alert: ("Error: There was a problem listing the companies in this city.");
        }
    });
}
{'fraction_non_alphanumeric': 0.16395443449959315, 'fraction_numerical': 0.0040683482506102524, 'mean_word_length': 2.132484076433121, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2115340', 'n_tokens_mistral': 754, 'n_tokens_neox': 732, 'n_words': 170}