How to get data from this website?

local HttpService = game:GetService("HttpService")
local URL = "https://buff.163.com/api/market/goods?game=csgo&goods_id=847256&page_size=1"
local response = HttpService:GetAsync(URL)
local data = HttpService:JSONDecode(response)
print(data.code)
if data.code == "OK" then
print(data.data.items)

end

So im trying to get “sell_min_price” by changing

print(data.data.items)

to

print(data.data.items.1.sell_min_price)

but im getting this error:
image
Anyone know how to fix it ?

You need to access numeric indices with square brackets:

print(data.data.items[1].sell_min_price)
1 Like

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