Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/380.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/72.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 使用把手返回特定的<;ul>&书信电报;李>;JSON中的标记_Javascript_Jquery_Html_Css_Handlebars.js - Fatal编程技术网

Javascript 使用把手返回特定的<;ul>&书信电报;李>;JSON中的标记

Javascript 使用把手返回特定的<;ul>&书信电报;李>;JSON中的标记,javascript,jquery,html,css,handlebars.js,Javascript,Jquery,Html,Css,Handlebars.js,我的javascript中有以下JSON对象: var source = $("#template").html(); var template = Handlebars.compile(source); var igListOrig = [ { "IG":"Problem Solving", "AIR_Indicators": "All Domain 1 Indicators* 3.1, 3.2, 3.3, 3.4", "SMP": "SMP 1, 2

我的javascript中有以下JSON对象:

var source = $("#template").html();
var template = Handlebars.compile(source);

var igListOrig = [
  {
    "IG":"Problem Solving", 
    "AIR_Indicators": "All Domain 1 Indicators* 3.1, 3.2, 3.3,     3.4", 
    "SMP": "SMP 1, 2, 3, 4, 5, 6, 7, and 8", 
    "Purpose": "Students must be able to reason, problem solve, communicate and make real life       decisions that require mathematical thinking.  Teaching students problem solving skills and giving them opportunities to apply their skills is critical to developing their capacity to solve mathematical problems that arise in all our lives (e.g. starting a small business, figuring out the area of a room in order to purchase the correct amount of paint, filling out a tax return, tracking and setting goals for investments, etc.)", 
    "IP":"Problem of the Week(PoW)", 
    "What": "PoWs are omplex problems that students solve and then explain their solutions and reasoning in a write up.  More weight should be given to mathematical thinking and a good write up than finding the correct solution.",
    "When": "PoWs should be administered once per month.  Students should work on problem the first 10-15 minutes of a period for 5-7 consecutive days.", 
    "How": "1.Introduce problem, process, and rubric. 2.Students are given time in class to work on problem throughout the week. 3.Students complete write up. 4.Student peer edit write up. 5.Students revise write up"
  },

  {
    "IG":"Problem Solving", 
    "AIR_Indicators": "All Domain 1 Indicators* 3.1, 3.2, 3.3,     3.4", 
    "SMP": "SMP 1, 2, 3, 4, 5, 6, 7, and 8", 
    "Purpose": "Students must be able to reason, problem solve, communicate and make real life       decisions that require mathematical thinking.  Teaching students problem solving skills and giving them opportunities to apply their skills is critical to developing their capacity to solve mathematical problems that arise in all our lives (e.g. starting a small business, figuring out the area of a room in order to purchase the correct amount of paint, filling out a tax return, tracking and setting goals for investments, etc.)", 
    "IP":"Problem of the Week(PoW)", 
    "What": "PoWs are omplex problems that students solve and then explain their solutions and reasoning in a write up.  More weight should be given to mathematical thinking and a good write up than finding the correct solution.",
    "When": "PoWs should be administered once per month.  Students should work on problem the first 10-15 minutes of a period for 5-7 consecutive days.", 
    "How": "1.Introduce problem, process, and rubric. 2.Students are given time in class to work on problem throughout the week. 3.Students complete write up. 4.Student peer edit write up. 5.Students revise write up"
  }

]

$('body').append(template(igListOrig));
如何使用把手辅助工具打印
igListOrig。[0]。如何在
  • 标签中打印

    这是我想要的html文件

    <div class="bottom-container text">
        <div class="cube">
          <h4>Instructional Practice</h4>
          <center><h3> {{IP}} </h3> </center> </br>
          <p><span class="description">What</span> {{What}} </p></br>
          <p><span class="description">When</span> {{When}} </p></br>
          <p><span class="description">How</span> {{How}} </p></br>
        </div>
    </div>
    
    
    教学实践
    {{IP}}
    什么{{什么}


    当{{When}


    How{{How}



    查看JS Fiddle查看完整示例

    我不完全清楚您在寻找什么,但是如果您想要编号的输出,您需要先将“.How”转换为数组。因此它看起来像这样<代码>[“介绍问题、过程和准则。”,“给学生……”
    啊,是的,但我如何做到这一点,并将其传递到句柄栏模板中。我无法更改JSON对象,因为它来自不同的源。一旦你有一个解码的JSON对象,它就是“pojo”。你可以做点什么。您可以循环pojo中的项目并对其运行正则表达式模式,例如
    .How'.split(/{0-9}\./)