Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
gspで多くのリストを1つのリストにマージしようとしています。例えば:
クラスAにはクラスBインスタンスのリストがあります
式を使用しようとすると${a.findAll(some_condition).b}、Bのインスタンスのリストのリストが表示されます。
${a.findAll(some_condition).b}
式が単一のリストを返すようにしたいのですが、すべてのインスタンスが以下を満たすbすべてのものに属しています。asome_condition
b
a
some_condition
試してみてください:
${a.findAll(some_condition).b.flatten()}
それはあなたに単一のリストを得るはずです
${a.findAll(some_condition).b.flatten().unique()}
重複も削除する必要があります