他の配列でいっぱいの個別のセッション変数に 2 つの個別の配列があります。別の値の出力に基づいて、配列の 1 つの属性を取り出そうとしています。これは基本的に、1 つの状態コード (他の属性を含む) と、他の属性の辞書です。
それらは次のようになります。
ディクショナリ配列
%array% [ { Id: '22', Name: 'Foo', Type: 'FooFoo', Description: 'More Foo', Enabled: 'true', Priority: 'number here' },
{ Id: '23', Name: 'Bar', Type: BarBar, Description: 'oh look more bars', Enabled: 'true', Priority: 'number here' },{...}]
と
ステータス配列:
%array% [{ Id: '54', Name: 'Name goes here', Status: '23', BrandName: 'Brand'}],{...} }]
私がやろうとしているのは次のようなものです
{%for Id in app.session.get('statusArray')%}
{% if Id.Status in app.session.get('dictionaryArray')%}
{{app.session.get('dictionaryArray').Name}}
{% endif %}
{%endfor%}
私も試してみました
{{attribute(app.session.get('dictionaryArray').Name, Id.Status)}}
またはその趣旨の何か。
TL;DR
ステータス配列によって指定された「ステータス:」に基づいて、ディクショナリ配列から名前を引き出す必要があります。