{"version":"1.0","type":"rich","title":"Gist 5986840","description":"This example demonstrates a minimal Python script that sorts an array of node objects by the `nodename` attribute. It shows how to reorder JSON-structured data before any visualization or further processing occurs. The code defines a small dataset containing two nodes, “foo” and “bar,” and uses the built-in `json` module to print the original and sorted representations. It relies on the standard Python `list.sort` method with a lambda function as the sorting key, directly mutating the `nodes` list and updating the `data` dictionary. The example illustrates a simple preprocessing step common in data-driven visualization workflows.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-5986840?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}