Trying to add new value to table

I am trying to add “Bone” to table.
But this results in an error.

i = 0
BestBones[i]['Bone'] = v_;

Error: attempt to index nil with ‘Bone’.

Thanks in advance for your help

You have to set the value as a table if it doesn’t exist yet:

i = 0
BestBones[i] = {Bone = v_}

print(BestBones[i]["Bone"])