【问题标题】:jsrender- access elements from complex structurejsrender - 从复杂结构中访问元素
【发布时间】:2015-03-12 09:27:22
【问题描述】:

我使用 JsRender 库从 rest 调用中获取元素作为 json 这是我的 Json 结构:

{
   "bugs" : [
      {
         "component" : "Rx",
         "resolution" : "",
         "status" : "NEW",
         "summary" : "There is a big delay"
      },
      {
         "component" : "Rx",
         "resolution" : "",
         "status" : "NEW",
         "summary" : "problem"
      }
   ]
}

我正在尝试访问状态,但我不能, 我试过了

{{:bugs.status}}
{{>~status}}

但这些都不适合我。 有什么建议吗?

【问题讨论】:

    标签: javascript jquery json jsrender jsviews


    【解决方案1】:

    我找到了答案:

    {{for bugs}}
    {{:status}}
    </br>
        {{/for}}
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-05-12
      • 1970-01-01
      • 1970-01-01
      • 2019-08-10
      • 2021-09-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多