Loop though Object

local hubInfo =  {
	["data"] =  {
		["group"] =  {
			["id"] = 9982685
		},
		["products"] =  {
			[1] =  {
				["developerProduct"] = "2738272382",
				["name"] = "test"
			}
		}
	},
	["success"] = true
}

How can I loop through all the products and print its name?

for productId, product in pairs(hubInfo.data.products) do
    print(productId, product.name)
end