Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7755255
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T12:31:21+00:00 2026-06-01T12:31:21+00:00

So currently I have a table in Lua that contains another table (much like

  • 0

So currently I have a table in Lua that contains another table (much like a hashtable). It’s called email_table, and I have my person_table inside it. The email_table’s keys are email_addresses and the person_table holds all information about a person.

Currently what I’m trying to do is sort my email_table based on a value that’s inside of person_table. The built in sort function for Lua does not work with such values unfortunately. How would I get started?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T12:31:22+00:00Added an answer on June 1, 2026 at 12:31 pm

    You cannot sort something that isn’t an array. If your keys aren’t monotonically increasing integers, then you can’t sort it. Sorting implies order, and there is no ordering on non-integer keys of tables.

    If “The email_table’s keys are email_addresses”, then email_table cannot be sorted. You can have another table that is a sorted list of email addresses. But this must be a list: the keys must be monotonically increasing integer values (1, 2, 3, 4, etc). Those have an explicit order.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have a table structure that looks something like this(some details omitted): ColumnName
I'm trying to normalize a mysql database.... I currently have a table that contains
Currently I have something in lua that is like OOP using tables. TCharacterController =
I currently have a table with an id column that is being autoincremented and
I currently have a table called paper , which holds all the information for
Currently we have a table that we use to track inivitations. We have an
I have some classes in C++ that I would like to expose to Lua.
I currently have a table listing all of the products that are in the
I currently have a table that has a width of 94%, and the following
I currently have a table with rows that contain a clickable link. When a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.