Lua read data from table


I have an SQL database that runs server side, and I am using the .net networking to send the table over to the client. However, once the client receives the table I’m not sure how to get the data from this table into what I need.

function loadRecordsListViewName()
local recordsListViewNames = vgui.Create( “DListView”, MainPanel )
recordsListViewNames:SetMultiSelect( false )
recordsListViewNames:AddColumn( “Name” ):SetFixedWidth( ScreenScale(100) );
recordsListViewNames:SetPos(ScreenScale(100), ScreenScale(88))
recordsListViewNames:SetSize(ScreenScale(100), ScreenScale(200))

net.Start(“requestNamesFromDB”) --requests to get names from server - shared.lua

net.Receive(“recieveNamesFromDB”, function(len)
for i, n in pairs( net.ReadTable() ) do
recordsListViewNames:AddLine( n ) --I tried this, but it’s only printing “1”

The function ideally would print each of the contents of the table into a new line on the list view.
I used PrintTable(net.ReadTable()) to see what my table looks like:

Name = SteamName1

How would I loop through adding both SteamName1 and any others from my table to my list view?

Thank you!

(User was banned for this post ("Wrong Section - Try the DEVELOPER DISCUSSION for HELP with LUA code" - Kiwi))