Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do you get values inside values?

So, if I have a JSON value like:

local whatever = {
	local something = nil;
};

Then how would you get "something" inside "whatever"?

1 answer

✓ Accepted answer

Iterate through the table.

local whatever = {
	something = "Hello!",
	nothing = "Nothing here!"
}

for i, v in pairs(whatever) do --iterate through the table
	print(v)
end

3 comments

0

How would you get one value and not all the values?

0

You can access the 'something' like this: print(whatever.something)

0

Thanks!

This discussion is preserved as it was. New answers, comments, and votes are closed.