次のような一連のネストされた yaml リストがあります。
title: the example
image: link.jpg
products:
- top-level: Product One
arbitrary: Value
nested-products:
- nested: Associated Product
sub-arbitrary: Associated Value
- top-level: Product Two
arbitrary: Value
- top-level: Product Three
arbitrary: Value
問題なく製品をループfor item in page.products
でき、論理演算子を使用して、ネストされた製品が存在するかどうかを判断できます-できないことはnested-products
、繰り返しごとに複数回ループすることですtop-level
および他のオプションを使用してみfor subitem in item
ましたが、機能しません。アイデアはありますか?