Want to sort a table field from Twig Guess this is a stupid question, but I'm trying to sort a table based on which column the user wants to sort.

Tried:

{% for row in entry.tablefield|sort %} (No effect)

{% for row in entry.tablefield.order('firstName') %} (Error message)

Anyone who know if this is possible or know how to do this?
You can't do that with core Craft functionality or Twig filters, but as Mats already suggested in the comments, you can do it with a plugin like "Super Sort".

The template code to sort the array returned from the table field with that plugin would be:

{% for row in entry.tablefield|supersort('sortAs', '{{ object.firstName }}') %}