Merge pull request #12798 from codeman869/fix/json-to-html-description
Adds JSON example to Convert JSON Data to HTMLpull/12752/head
commit
c464600867
|
@ -414,7 +414,9 @@
|
|||
"Here's the code that does this:",
|
||||
"<blockquote>json.forEach(function(val) {</br> var keys = Object.keys(val);</br> html += \"<div class = 'cat'>\";</br> keys.forEach(function(key) {</br> html += \"<strong>\" + key + \"</strong>: \" + val[key] + \"<br>\";</br> });</br> html += \"</div><br>\";</br>});</blockquote>",
|
||||
"<hr>",
|
||||
"Add a <code>forEach</code> method to loop over the JSON data and create the HTML elements to display it."
|
||||
"Add a <code>forEach</code> method to loop over the JSON data and create the HTML elements to display it.",
|
||||
"Here is some example JSON",
|
||||
"<blockquote>[</br> {</br> \"id\":0,</br> \"imageLink\":\"https://s3.amazonaws.com/freecodecamp/funny-cat.jpg\",</br> \"altText\":\"A white cat wearing a green helmet shaped melon on it's head. \",</br> \"codeNames\":[</br> \"Juggernaut\",</br> \"Mrs. Wallace\",</br> \"Buttercup\"</br> ]</br> }</br>]</blockquote>"
|
||||
],
|
||||
"challengeSeed": [
|
||||
"<script>",
|
||||
|
|
Loading…
Reference in New Issue