From c466c223ca5a0a0c9e8c2216b2cacd8080b5ca48 Mon Sep 17 00:00:00 2001 From: Dylan H Date: Sat, 16 Jul 2016 19:14:41 -0500 Subject: [PATCH] Changed tag to var html = \"\";.", "Then, let's loop through our JSON, adding more HTML to that variable. When the loop is finished, we'll render it.", "Here's the code that does this:", - "
json.forEach(function(val) {
var keys = Object.keys(val);
html += \"<div class = 'cat'>\";
keys.forEach(function(key) {
html += \"<b>\" + key + \"</b>: \" + val[key] + \"<br>\";
});
html += \"</div><br>\";
});
" + "
json.forEach(function(val) {
var keys = Object.keys(val);
html += \"<div class = 'cat'>\";
keys.forEach(function(key) {
html += \"<strong>\" + key + \"</strong>: \" + val[key] + \"<br>\";
});
html += \"</div><br>\";
});
" ], "challengeSeed": [ "fccss", @@ -270,7 +270,7 @@ "En primer lugar, vamos a declarar una variable llamada html con var html = \"\";.", "Después, iteremos a traveś de nuestro JSON, añadiendo más HTML a esa variable. Cuando se termina el ciclo, vamos a presentarla. ", "Aquí está el código que hace esto:", - "
json.forEach(function(val) {
var keys = Object.keys(val);
html += \"<div class = 'cat'>\";
keys.forEach(function(key) {
html += \"<b>\" + key + \"</b>: \" + val[key] + \"<br>\";
});
html += \"</div><br>\";
});
" + "
json.forEach(function(val) {
var keys = Object.keys(val);
html += \"<div class = 'cat'>\";
keys.forEach(function(key) {
html += \"<strong>\" + key + \"</strong>: \" + val[key] + \"<br>\";
});
html += \"</div><br>\";
});
" ], "titlePt": "Converter dados JSON para HTML", "descriptionPt": [ @@ -279,7 +279,7 @@ "Em primeiro lugar, vamos declarar uma variável chamada html com var html = \"\";.", "Depois, vamos percorrer através do nosso JSON, adicionando mais HTML para a nossa variável. Quando essa iteração terminar, vamos apresentar o resultado.", "Aqui está o código que faz isso:", - "
json.forEach(function(val) {
var keys = Object.keys(val);
html += \"<div class = 'cat'>\";
keys.forEach(function(key) {
html += \"<b>\" + key + \"</b>: \" + val[key] + \"<br>\";
});
html += \"</div><br>\";
});
" + "
json.forEach(function(val) {
var keys = Object.keys(val);
html += \"<div class = 'cat'>\";
keys.forEach(function(key) {
html += \"<strong>\" + key + \"</strong>: \" + val[key] + \"<br>\";
});
html += \"</div><br>\";
});
" ] }, {