|
2021년 1월부터 기존 파일 형식을 더 이상 사용할 수 없습니다. 기존 파일을 전환하거나 PDF를 다운로드할 수 있습니다. 자세히 알아보기

Handlebars - Element Reference

답변함
0

댓글

댓글 2개

  • Jeff Hickey

    Hi Chad.

    You can use "../" notation to look back one level. Based on the JSON you provided, the following template produces the output you're looking for. See the template in action here.

    data_id,location_id,value
    {{#each data}}
    {{#each company.location}}
    {{../id}},{{id}},{{value}}
    {{/each}}
    {{/each}}

    For more information on Handlebars in general, I recommend the Start Here post Getting Started with Handlebars in Chains.

    1
  • Chad Weber

    Thanks Jeff

    This works!

    0

댓글을 남기려면 로그인하세요.