Help With Tables

I know how to print specific entries from a table, but how to you print a specific field from a table?

thetable = {}

PrintTable ( thetable[3] )

This would print the third entry in the table, how would print a specific field within an entry?

print( thetable[3] )

Did not work, and wouldn’t that only print entry[3] like I already know how to do?

Here is what my table is printing, id like to only grab the positions.

		class	=	death
		pos	=	-79.018898 292.711700 -12267.968750
		class	=	fire
		pos	=	-26.074100 577.555115 -12267.968750

for k,v in ipairs(thetable) do
local pos = v.pos

Works great brandon! Whats the deal with ipairs? I have never seen that before.

It’s used for tables that have integers for their indexes that are sequentially incremented, which can be called a hash table.

You can learn more about it here:

Thanks for the documentation I appreciate it.