1. ok, this is making my brain hurt and it seems like it would be simple, but i can't find anything to get it working.

    I want to sort a nested table.

    t[1]= {name="bob",amount="2",link="whiskey") t[2]= {name="steve",amount="3",link="bravo") t[3]= {name="alex",amount="2",link="alpha")

    I want to sort table t by the "link" variable and then print the sorted table. i just cnat figure it out...???

    ok, this is making my brain hurt and it seems like it would be simple, but i can't find anything to get it working.

    I want to sort a nested table.

    t[1]= {name="bob",amount="2",link="whiskey") t[2]= {name="steve",amount="3",link="bravo") t[3]= {name="alex",amount="2",link="alpha")

    I want to sort table t by the "link" variable and then print the sorted table. i just cnat figure it out...???

     table.sort(t, function(a, b)
       return a.link < b.link
     end)
    
     for k, v in ipairs(t) do
       print(v.link)
     end
    

    Sorting tables such as this is covered in Chapter 5, I believe.