Fruits = { apple = { ordered = true, amount = 10 }}
i have several different kinds of fruits in this table and i need to output everything where ordered=true to make it look like this:
apple ordered: true | apple amount: 10
Made it like this
for a,b in pairs(Fruits) do
for c,d in pairs(b) do
if (d == true) then
print(a..” ordered: ”..tostring(d)..” | “..a..” amount: “..tostring(d)..”)
end
end
end
but the output is this
apple ordered: true | apple amount: true