JSFiddle - React, Tailwind, and code Playground

HTML

<div>
    <span>Names</span>
    <p id="names"></p>
</div>
<br/>
<div>
    <span>Titles</span>
    <p id="titles"><p>
</div>

JavaScript

var doctors = {
"DoctorA": {
"name": "Pharmaceuticals", "title": "Switzerland, 120000 employees"},
"DoctorB": {"name": "Consulting", "title": "USA, 5500 employees"},
"DoctorC": {"name": "Diagnostics", "title": "USA, 42000 employees"},
"DoctorD": {"name": "Fin Serv. & Wellness", "title": "South Africa,  employees"}
};

var names = [];
var titles = [];
for (key in doctors) {
    var doctor = doctors[key];
    names.push(doctor.name);
    titles.push(doctor.title);
}

document.getElementById('names').innerHTML = names;
document.getElementById('titles').innerHTML = titles;