I wanna check if two tables have the same value in Lua, but didn\'t find the way.
I use the operator ==
, it seems just to check the same objects, but no
There is no built-in function for comparing tables by contents.
You'll have to write your own. You'll need to decide whether you want to compare tables by contents shallowly or deeply. See https://web.archive.org/web/20131225070434/http://snippets.luacode.org/snippets/Deep_Comparison_of_Two_Values_3 for some ideas.