<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://linguifex.com/w/index.php?action=history&amp;feed=atom&amp;title=Module%3Atable%2FgetNested</id>
	<title>Module:table/getNested - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://linguifex.com/w/index.php?action=history&amp;feed=atom&amp;title=Module%3Atable%2FgetNested"/>
	<link rel="alternate" type="text/html" href="https://linguifex.com/w/index.php?title=Module:table/getNested&amp;action=history"/>
	<updated>2026-05-18T13:51:56Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://linguifex.com/w/index.php?title=Module:table/getNested&amp;diff=495429&amp;oldid=prev</id>
		<title>Sware: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://linguifex.com/w/index.php?title=Module:table/getNested&amp;diff=495429&amp;oldid=prev"/>
		<updated>2026-04-21T12:01:17Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 12:01, 21 April 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Sware</name></author>
	</entry>
	<entry>
		<id>https://linguifex.com/w/index.php?title=Module:table/getNested&amp;diff=475300&amp;oldid=prev</id>
		<title>Sware: Created page with &quot;local error = error local select = select  --[==[ Given a table and an arbitrary number of keys, will successively access subtables using each key in turn, returning the value at the final key. For example, if {t} is { {[1] = {[2] = {[3] = &quot;foo&quot;}}}}, {export.getNested(t, 1, 2, 3)} will return {&quot;foo&quot;}.  If no subtable exists for a given key value, returns nil, but will throw an error if a non-table is found at an intermediary key.]==] return function(...) 	local n = selec...&quot;</title>
		<link rel="alternate" type="text/html" href="https://linguifex.com/w/index.php?title=Module:table/getNested&amp;diff=475300&amp;oldid=prev"/>
		<updated>2025-11-04T21:38:49Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;local error = error local select = select  --[==[ Given a table and an arbitrary number of keys, will successively access subtables using each key in turn, returning the value at the final key. For example, if {t} is { {[1] = {[2] = {[3] = &amp;quot;foo&amp;quot;}}}}, {export.getNested(t, 1, 2, 3)} will return {&amp;quot;foo&amp;quot;}.  If no subtable exists for a given key value, returns nil, but will throw an error if a non-table is found at an intermediary key.]==] return function(...) 	local n = selec...&amp;quot;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 21:38, 4 November 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Sware</name></author>
	</entry>
	<entry>
		<id>https://linguifex.com/w/index.php?title=Module:table/getNested&amp;diff=495428&amp;oldid=prev</id>
		<title>wikt&gt;Theknightwho at 21:41, 14 May 2025</title>
		<link rel="alternate" type="text/html" href="https://linguifex.com/w/index.php?title=Module:table/getNested&amp;diff=495428&amp;oldid=prev"/>
		<updated>2025-05-14T21:41:49Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local error = error&lt;br /&gt;
local select = select&lt;br /&gt;
&lt;br /&gt;
--[==[&lt;br /&gt;
Given a table and an arbitrary number of keys, will successively access subtables using each key in turn, returning the value at the final key. For example, if {t} is { {[1] = {[2] = {[3] = &amp;quot;foo&amp;quot;}}}}, {export.getNested(t, 1, 2, 3)} will return {&amp;quot;foo&amp;quot;}.&lt;br /&gt;
&lt;br /&gt;
If no subtable exists for a given key value, returns nil, but will throw an error if a non-table is found at an intermediary key.]==]&lt;br /&gt;
return function(...)&lt;br /&gt;
	local n = select(&amp;quot;#&amp;quot;, ...)&lt;br /&gt;
	if n &amp;lt; 2 then&lt;br /&gt;
		error(&amp;quot;Must provide a table and at least one key.&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
	local t, k = ...&lt;br /&gt;
	for i = 3, n do&lt;br /&gt;
		local v = t[k]&lt;br /&gt;
		if v == nil then&lt;br /&gt;
			return nil&lt;br /&gt;
		end&lt;br /&gt;
		t, k = v, select(i, ...)&lt;br /&gt;
	end&lt;br /&gt;
	return t[k]&lt;br /&gt;
end&lt;/div&gt;</summary>
		<author><name>wikt&gt;Theknightwho</name></author>
	</entry>
</feed>