How to loop through all tables in module?

How would I loop through all tables in a module to find something, without having to write a loop for every single table.

Example:

local componentsModule = {}

componentsModule.Handles = {
	WoodenHandle = {Name = "WoodenHandle", Multiplier = 1.1},
	PlasticHandle = {Name = "PlasticHandle", Multiplier = 1.25},
}

componentsModule.Handles = {
	WoodenHandle = {Name = "WoodenHandle", Multiplier = 1.1},
	PlasticHandle = {Name = "PlasticHandle", Multiplier = 1.25},
}

componentsModule.Handles = {
	WoodenHandle = {Name = "WoodenHandle", Multiplier = 1.1},
	PlasticHandle = {Name = "PlasticHandle", Multiplier = 1.25},
}
return componentsModule
for _, tbl in pairs(componentsModule) do
    -- tbl is Handles
    for k, v in pairs(tbl) do
        print(k, v)
    end
end

Keep in mind that if you have multiple tables with the same name in the module, only the last one will actually be kept.

Iterating multi-dimensional data-structures of an unknown depth is a perfect problem for recursion. Recursion is the process of recursively (repeatedly) calling a function from within itself. One thing to note, though: function calls allocate stack memory, and the stack space is constant. This means we can’t utilize recursion forever. There is no base-case (the condition where recursion is stopped) you can set for this type of problem, so you’ll have to stray away from using this solution on large data structures:

local function findDeep<T>(container: {}, target: T): T?
    for key, value in container do
        if value == target then
            return key, container
        elseif type(value) == "table" then
            return findDeep(value, target)
        end
    end
end

The algorithm above is known as Depth-First Search (DFS). This algorithm works in-order, diving into the first and deepest layer of the data-structure. It will work its way back up until the first layer has been fully combed, then proceed to the next layer
image