I have an array of objects:
dataArray = [{thing1: foo, thing2: baa, thing3:foobaa},{thing1: doo, thing2: daa, thing3: doodaa}] Which I am editing in a function by iterating over the lines:
for obj in dataArray: DO STUFF I want to skip the whole object if ANY of the values are empty.
e.g. if
dataArray['thing2'] == '' Is there a way to generalise this without having to iterate though all the keys in the obj?
any()(a python function whose name appears in the title of your question).if any(v == '' for v in obj.values()): continue?