JSFiddle - React, Tailwind, and code Playground
by Pris Wiz
JavaScript
 var btsFrontEnd = {
"employee-1": {
"name": "Jose Ramon",
"phone": "1234567890",
"email": "[email protected]"
},
"employee-2": {
"name": "Volmar Machado",
"phone": "1234567890",
"email": "blah@blah."
}
};
btsFrontEnd.employee-2
var btsemployees = {
employees:[
{
"name": "Jose Ramon",
"phone": "1234567890",
"email": "[email protected]"
},
{
"name": "Volmar Machado",
"phone": "1234567890",
"email": "[email protected]"
},
{
"name": "EL Luar",
"phone": "1234567890",
"email": "[email protected]"
},
{
"name": "Miguel Gocobachi",
"phone": "1234567890",
"email": "[email protected]"
}
]
};
//First argument is our data structure (an object or an array
//Second argument is a callback (logic we apply to our data structure)
$.each(btsFrontEnd, function (key, value) //first is the key or index, second argument is the value