A Pen by Yerlin Matu on CodePen.
Last active
May 20, 2017 07:06
-
-
Save YerlinMatu/104cd9d3a59c0c2ed0fca91813c2f023 to your computer and use it in GitHub Desktop.
JSON Syntax
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Empleados = [ | |
{ | |
nombre: 'Jarry', | |
sueldo: 820 | |
}, | |
{ | |
nombre: 'Tomas', | |
sueldo:789 | |
}, | |
{ | |
nombre: 'Pedro', | |
sueldo: 659 | |
}, | |
{ | |
nombre: 'Claudia', | |
sueldo: 345 | |
} | |
]; | |
var Sueldo2017 = Empleados.map((empleado)=> empleado.sueldo = (empleado.sueldo + 150) * 1000); | |
Empleados.sueldo = Sueldo2017; | |
for(let item of Empleados){ | |
item.experiencia = Math.abs((item.sueldo / 7).toFixed()); | |
} | |
var EmpleadosAPI = JSON.stringify(Empleados); | |
document.write(EmpleadosAPI); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link href="https://cdnjs.cloudflare.com/ajax/libs/milligram/1.3.0/milligram.min.css" rel="stylesheet" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
JSON Practical things