Migrating from with_X to loop
In most cases, loops work best with theloopkeyword instead ofwith_Xstyle loops. Theloopsyntax is usually best expressed using filters instead of more complex use ofqueryorlookup.
These examples show how to convert many commonwith_style loops toloopand filters.