{"version":"1.0","type":"rich","title":"JavaScript Arrays","description":"This example demonstrates how to sort an array of objects by a key using D3’s `ascending` comparator within a JavaScript `sort()` method. The code defines three entries with keys and values, then logs the sorted array to the console. It relies on the D3 library version 7.8.5, importing the `ascending` function from the `d3` module. The example highlights a concise alternative to manual comparator logic, with commented-out code showing a `reduce` operation for future object transformation.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/531ecb94ce8c44bba9c3ef61a7ffd140?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}