Print out list of tile properties

Does anyone have a working example? I have been stuck with this forever, its ridiculous…
Graham has been very useful but we are not getting anywhere.

Heres my current code which is probably the 50th attempt

[lua]local tileLayer = wMap:getTileLayer(“Equipment”)

local tiles = tileLayer.tiles
print(1)
for i = 1, #tiles, 1 do
local tile = tiles[i]
local properties = tile:getProperties()
–print(properties) --this prints table references

for k, v in pairs( properties ) do
print( v:getName() … ", " … v:getValue() )
end
–absolutely jack return, and does iterate through all the tiles

for j = 1, #properties, 1 do
print( properties[j]:getName(),properties[j]:getValue() )
end
end[/lua]

Graham did mention the properties table isnt indexed, its name based which ensures no duplicates [import]uid: 63700 topic_id: 13912 reply_id: 313912[/import]

Have you tried the print_r() function? Search for it. Its either in a forum post or code exchange.

Basically pass any table to it print_r(myTable) and it dumps it similar to the way PHP’s print_r() works or perl’s Dumper::dump CPAN module works.

[import]uid: 19626 topic_id: 13912 reply_id: 51153[/import]

mmmm no i havent, i dont even know of that function.

Anyway Murphys law, i figured it out, the most important thing is to build visuals before executing the function [import]uid: 63700 topic_id: 13912 reply_id: 51158[/import]