How would I rerun a statement to get all values in a table

I just want to know how you would rerun a to get all values that are equal to an if statement please help.

What do you mean exactly?
Like?

if Value1 = true and Value2 = 2 then
print("Value is true")
end

--or like a table
local table = {69,"Mars",false}
for i,v in pairs(table) do
print(i,v)
end
--Output:
--1,69
--2,Mars
--3,false
{game.Teams["Purple Kingdom"], game.Teams["Blue Kingdom"], game.Teams["Red Kingdom"], game.Teams["Green Kingdom"]}
for i, team in ipairs(teams) do
	local count = #team:GetPlayers()
	if count < minvalue then
		minvalue = count
		minindex = i
		wait(.1)
		print(team)
	end
end

how would I get all the values in the table?

You could do

--1.Gets the values in the tables 1 by 1

local teamtable ={game.Teams["Purple Kingdom"], game.Teams["Blue Kingdom"], game.Teams["Red Kingdom"], game.Teams["Green Kingdom"]}
local Team1 = teamtable[1]--PurpleKingdom
local Team1 = teamtable[2]--Bluekingdom

-or
--2.Cycles through all the teams in the table.

for index, team in pairs(teamtable) do
print(index,team)
end

If you trying to get all the values at once I don’t believe you can. You would need to do a for loop and cycle through all the values one by one changing each of them

Get the players on each team? get the team names?
If statement to Compare with what?