0
I received a challenge that I have to accomplish my curriculum in HTML, so my professional experiences and technical skills have to pick up via request as described below:
"The list of companies MUST be loaded through a request that must return the mockup of a JSON containing the list of companies that in turn must be interpreted and arranged on the screen correctly (You can use the site https://www.mockable.io/ to create the mockup)."
Following the guidance I did my GET json on mockable.io and stayed in the following way:
{
"empresas": [
{
"id": "1",
"periodo": "[2012-2015]",
"empresa": "OLISA COM. DE FRIOS E LATICINIOS LTDA",
"cargo": "AUXILIAR ADMINISTRATIVO",
"funcoes": "ROTINAS ADMINISTRATIVAS, TELEVENDAS, COMPRAS."
},
{
"id": "2",
"periodo": "[2015-2016]",
"empresa": "OLISA COM. DE FRIOS E LATICINIOS LTDA",
"cargo": "VENDEDOR",
"funcoes": "VENDA DE FRIOS E LATICINIOS, ESTOQUE, LOGISTICA."
},
{
"id": "3",
"periodo": "[2016-2018]",
"empresa": "E.C.P NUNES DE OLIVEIRA COM. DE FRIOS E LATICINIOS ME",
"cargo": "VENDEDOR",
"funcoes": "VENDA DE FRIOS E LATICINIOS, ESTOQUE, LOGISTICA."
},
{
"id": "4",
"periodo": "[2018-ATUAL]",
"empresa": "ASTERSOFT SISTEMAS LTDA",
"cargo": "VENDEDOR",
"funcoes": "VENDA E COMERCIO DE SOFTWARE ERP/CONTABIL/LOTEAMENTO."
}
]
}
and my HTML was like this:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Curriculum Samuel de Oliveira Neto</title>
</head>
<body>
<script>
"use strict";
const urlXP = "https://demo1915525.mockable.io/expprofissional";
const urlHAB = "https://demo1915525.mockable.io/habtecnicas";
function httpGetAsync(theUrl, callback) {
let xmlHttp = new XMLHttpRequest();
xmlHttp.onreadystatechange = function() {
if (xmlHttp.readyState == 4 && xmlHttp.status == 200)
callback(xmlHttp.responseText);
}
xmlHttp.open("GET", theUrl, true); // true for asynchronous
xmlHttp.send(null);
}
httpGetAsync(urlXP, (resp) => {
console.log("urlXP", resp);
})
httpGetAsync(urlHAB, (resp) => {
console.log("urlHAB", resp);
})
</script>
<h1> Samuel de Oliveira Neto </h1>
<hr>
<h3>Brasileiro, União estavel, 23 anos.</h3>
<h3>Rua José Roque Salton, 1334 - Terra Bonita - Londrina-PR</h3>
<h3>Categoria CNH: A/B</h3>
<h3>Telefone: (43)99687-5004 / E-mail: [email protected]</h3>
<hr>
<h1>Experiências Profissionais:</h1>
<hr>
<hr>
<h1> Formação: </h1>
<hr>
<h3>•Ensino Médio Completo. </h3>
<h3>•Cursando Analise e Desenvolvimento de Sistemas (Faculdade Positivo Londrina) Periodo: 4º Semestre (2º Ano) </h3>
<hr>
<h1>Habilidades Técnicas:</h1>
<hr>
<hr>
<h1>Idiomas:</h1>
<hr>
<h3>•Inglês: Escrita - Básico / Leitura - Básico</h3>
<hr>
<h1>Interesses Profissionais:</h1>
<hr>
<h3>•Desenvolvimento Front-End</h3>
<h3>•Disponibilidade de horarios: matutino e vespertino</h3>
</body>
</html>
The question is: how do I get my json information to appear within the respective HTML fields? (Exp. Professional and Technical Skills?)
Att.
how will you get access to this json? in your html you have access?
– Gabriella Selbach