Help with table item names

Hello, I’m using APIs to get players gamepasses and clothes they are selling but the ‘price’ value in one API had a capital and in the other it has a lowercase. So obviously this loop doesn’t work when it gets to the second APIs items. Is there anyway I could make both of the Price value names have a lowercase or modify my loop to somehow work. any help is very much apricated, Thanks.

Loop:

for i, item in pairs(Data) do
			local clone = template:Clone()
			clone.Name = item.price
			clone.PriceLabel.Text = item.price .. "$"
			clone.Parent = itemsScroller
			clone.Visible = true

Is item a table? If so you can try something like:

clone.PriceLabel.Text = (item.price or item.Price) .. '$'
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.