def getRecipe(name, quantity=1):
    chain = []
if name in recipes:
    for item in recipes[name]['ingredients']['input']:
        if item in recipes:
            chain.append(getRecipe(item, quantity))
else:
    chain.append(item)
return chain
Рекурсивное чтение данных Python