У меня есть набор вложенных списков ямлов с чем-то вроде следующего:
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
и другие параметры - но я не могу заставить его работать - любые идеи?