Eplace part of a command with a string

Hi,

is it possible to replace part of a command with a string? so that the returnData below will read profile.Data.Coins

local test = "Coins"
local returnData = profile.Data.[test]

Try this:

local test = "Coins"
local returnData = profile.Data[test]

This should make returnData equal to profile.Data.Coins