Best way to insert an array into a table

Hello,
I am trying to find a way to be able to insert an array into a table. Here is an example of what I am trying to do,

local Tags = {
	["Owner"] = { TagText = "Owner", TagColor = Color3.fromRGB(176, 0, 21)},
}

I am trying to obtain the values from a folder that has the name of the tag and the values of the tag text, and color. So far what I’ve tried is creating a temp array with the values and inserting that into the array of tags but how do I go about and set the name of the array, in this case, [“Owner”].

Thanks

just do:

local Tags = {
	["Owner"] = { TagText = FolderPath.TagText.Value, TagColor = FolderPath.TagColor.Value},
}

Thanks for the reply.
I got that part, I should have been more clear, but my issue is, using a loop, how do I create a separate array for each folder, then set the values to that array with the values within that folder, so like this

local Tags = {
	["FOLDER 1 NAME"] = { TagText = "Owner", TagColor = Color3.fromRGB(176, 0, 21)},
    ["FOLDER 2 NAME"] = { TagText = "Owner", TagColor = Color3.fromRGB(176, 0, 21)},
}

Simple.

Tags["Your'i'Name"] = variable
1 Like
Array = {1, 2, 3}
table.insert(Tags["Owner"], Array)

So something like this?

for i,v in pairs(tagFolder:GetChildren()) do
    Tags[v.Name] = {
          TagText = v.tagName.Value
          TagColor = v.tagColor.Value
    }
end

Quite simple just do

local GlobalData = {}

for _, v in pairs(folders:GetChildren()) do
  local data = {}
  for _, a in pairs(v:GetChildren()) do
    data[a.Name] = a.Value
  end
  GlobalData[v.Name] = data
end

Yes, you just forgot the comma.

for i,v in pairs(tagFolder:GetChildren()) do
    Tags[v.Name] = {
          TagText = v.tagName.Value,
          TagColor = v.tagColor.Value
    }
end

I should of realized it was that simple. Thank you for your help!

No problem,