|
Klassiska filtyper är inte längre tillgängliga för användning från och med januari 2021. Du kan överföra dina klassiska filer eller ladda ner en PDF. Läs mer

Handlebars - Element Reference

Besvarat
0

Kommentarer

2 kommentarer

  • 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

Du måste logga in om du vill lämna en kommentar.