Title: Sorting a column for a value
Last modified: March 8, 2022

---

# Sorting a column for a value

 *  Resolved [jimrossdev](https://wordpress.org/support/users/jimrossdev/)
 * (@jimrossdev)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/sorting-a-column-for-a-value/)
 * Hi
 * Love your plugin.
 * Trying to sort the a particular column to find a particular value/pair. Once 
   I can find it, I want to change the colour or something. But, I cant seem to 
   find the documentation to do such an action.
    Is the best practice to use the
   JSON file? (How do I find access to that?)
 * Or use your nifty table plugin?
 * Any direction would be great!
 * Jim
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fsorting-a-column-for-a-value%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/sorting-a-column-for-a-value/#post-15439300)
 * Hi,
 * thanks for your post, and sorry for the trouble.
 * I’m not sure that I understand. Where exactly do you want to highlight something?
   And who is going to do this? You, once, or some visitor when they view the table?
   What JSON file are you referring to here?
 * Regards,
    Tobias
 *  Thread Starter [jimrossdev](https://wordpress.org/support/users/jimrossdev/)
 * (@jimrossdev)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/sorting-a-column-for-a-value/#post-15441043)
 * Hi Tobias
 * Thanks for answering my question.
 * I should clarify. On each of the entries in my table, the values change due to
   the formula I made. I want to locate a particular value/pair on a particular 
   column. but the place of that value/pair will change each time I make a new entry.
   So, have you made a filter so that I can find a particular value on a particular
   column or row? If not, then where can I access the JSON file?
    In short, Im looking
   to find the number one ranked album. It changes after each entry.
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/sorting-a-column-for-a-value/#post-15451234)
 * Hi,
 * the TablePress Row Filter Extension from [https://tablepress.org/extensions/row-filter/](https://tablepress.org/extensions/row-filter/)
   can be used to find rows by keyword, but that won’t really help with formula 
   results.
    I can therefore only imagine a JavaScript-based solution. You could
   e.g. set the pagination to 1 on the table’s “Edit” screen and add this to the“
   Custom Commands” text field to trigger a sort of your ranking column:
 *     ```
       "order": [ [ 2, "desc" ] ]
       ```
   
 * This would sort by the third column (counting starts with 0) when the page is
   loaded.
 * As for the JSON file: TablePress does use JSON, but that’s stored in the database(
   in the `wp_posts` database table). This won’t really help here, I believe, as
   the formulas are not yet calculated in the database.
 * Regards,
    Tobias

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Sorting a column for a value’ is closed to new replies.

 * ![](https://ps.w.org/tablepress/assets/icon.svg?rev=3192944)
 * [TablePress - Tables in WordPress made easy](https://wordpress.org/plugins/tablepress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tablepress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tablepress/)
 * [Active Topics](https://wordpress.org/support/plugin/tablepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tablepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tablepress/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [4 years, 2 months ago](https://wordpress.org/support/topic/sorting-a-column-for-a-value/#post-15451234)
 * Status: resolved