Cant access object through script

Title explains the issue, can’t seem to access this object in the code I have. I know how to access them, I just can’t seem to get this to work.

I tried checking out this post How to access an object? and a few posts on stackoverflow. This is a really easy issue, so i’m not sure why its so complicated.

As the title states, I’m trying to access an object in lua. I’ve learned that dot notation doesn’t work, so the alternative is to use [] brackets. I have this object here that I can’t seem to access.

                   [1] =  ▼  {
                      ["CopperOre"] =  ▼  {
                         ["Counter"] = 0,
                         ["Earned"] = 0
                      }
                   }

after realizing dot notation doesnt work, I tried using [] brackets. Still was being returned nil.
The object can be printed simply by saying print(data)

However, I cannot do data.CopperOre.Counter or data['CopperOre]['Counter']

let’s say you want to get Counter and Earned

local Table = {
    {
        ["CopperOre"] = {
            ["Counter"] = 0,
            ["Earned"] = 0
        }
    }
}

data[1]["CopperOre"]["Counter"]
data[1]["CopperOre"]["Earned"]

you simply forgot a simple “1”