Can anyone who can understand Catalog API better then me help me out here?
local httpserv = game:GetService("HttpService")
local CatalogUrl = "https://catalog.RoProxy.com/v1/search/items/details?Category=11"
local GetItem = httpserv:GetAsync(CatalogUrl)
print(GetItem)
I am getting the table back from roblox here, but I am not able to get the components of the table here. I have tried to use .find and tried some other solutions on devforms aswell but still I am not able to go through the id of any of the returned values.
When i try to decode instead of getting the lua form of the table I instead recieve this:
table: 0x09ec8b78382f4376
My current code is:
local httpserv = game:GetService("HttpService")
local CatalogUrl = "https://catalog.RoProxy.com/v1/search/items/details?Category=11"
local GetItem = httpserv:GetAsync(CatalogUrl)
local xyz = httpserv:JSONDecode(GetItem)
print(xyz)
Ok a few questions, I am fairly new to this so might seem as dumb questions but when I decode a Json format shouldn’t it provide directly with the lua format? And secondly right now with your help I am able to print the first 2 parts of the table, but from what I understand from looking at this is that the actual ids of the items are inside a table which is inside another table. Am I looking at it wrong, if not how will I be able to access the second table contents.
Just had to tweak a few changes but works well now! Thanks for the help.
New code:
for i, v in pairs(xyz) do
if type(v) == "table" then
for i2, v2 in pairs(v) do
for i3, v3 in pairs(v2) do
if i3 == "productId" then
print(i3, v3)
end
end
end
end
end