It’s probably simple enough, but basically, I have an API script that comes back as a table, problem is is that the table it comes back as a line with more than one word (“Global Quote” rather than “GlobalQuote” ). And, in order to get data from it as you can see on line 16, I need to be able to well, call it.
Script:
local Api_Stock = script.Parent.Ticker.Value
local Api_Key = 'API Key Here'
local Api_Url = 'https://www.alphavantage.co/query?function=GLOBAL_QUOTE&symbol='..Api_Stock..'&apikey='..Api_Key
local HS = game:GetService("HttpService")
local Data
local s, e = pcall(function()
Data = HS:GetAsync(Api_Url)
end)
if Data ~= nil then
Data = HS:JSONDecode(Data)
local Current = tostring(Data.GlobalQuote[05])
end