认为我的json是这样的:
{
main: {
"" : [{some_obj},{some_obj}]
},
secondary: {
"key": [{some_obj},{some_obj}]
}
}
Run Code Online (Sandbox Code Playgroud)
现在我的第一个#each将运行主要和辅助.
{{#each this}}
-- This is for main and secondary --
{{#each this}}
-- This is for "" in case of main and "key" in case of secondary --
{{/each}}
{{/each}}
Run Code Online (Sandbox Code Playgroud)
如果"this"为空,我的嵌套#each将无效,如我的json中显示的"main"属性所示