JSFiddle - React, Tailwind, and code Playground

by naryad

JavaScript

var employees = JSON.parse('{"Employees":[{"Employee":{"Employee ID":"777","Short Name":"abc","First name":null,"Middle name":null,"Last name":null,"Designation":"Senior Engineer","Ext-1":null,"Ext-2":null,"Mobile-1":null,"Mobile-2":null,"Email":"[email protected]"}},{"Employee":{"Employee ID":"888","Short Name":"xyz","First name":null,"Middle name":null,"Last name":null,"Designation":"Test Lead","Ext-1":null,"Ext-2":null,"Mobile-1":null,"Mobile-2":null,"Email":"[email protected]"}}]}');

document.write('<br/>' + employees.Employees[0].Employee.Ext-1);
document.write('<br/>' + employees.Employees[0].Employee['Ext-1']);
document.write('<br/>' + employees.Employees[0].Employee["Employee ID"]);