I want to sort a tinyDB file in decending order based on values stored not tags

List of pairs to dict: the list [{}] is not a well-formed list of pairs

Let us try to understand what you want to do....

Assume you have three entries in yout tinydb:

tag = a, value = 9
tag = b, value = 10
tag = c, value = 4

You want to sort these by value?

Call the tags with taglist and add the tag and value in a loop to a LIST


then sort the sub lists by the second item in each sub list using the built-in list blocks, to get:


then what ?

Since when does TinyDB accept a list as a tag, as in your last block?

TinyDB stores tags in alpha order.

P.S. What you want is a list of lists.
Those allow reordering.

Here are two advanced list sort blocks you can use:

TinyDB tag/value collections and dictionaries are forced to remain in tag/key order.