{"version":"1.0","type":"rich","title":"JavaScript Arrays","description":"This example demonstrates common JavaScript array operations, including sorting with custom comparators, mapping to objects, reducing to a total, and converting arrays to nested objects. It compares default lexicographic sorting with numeric ascending and descending sorts using both plain JavaScript and D3’s `ascending` function. The code logs sorted arrays, transformed objects, and reduced results to the console, showing how D3’s `ascending` handles key-based sorting for objects. The visualization is purely computational, with no DOM or graphical output, relying on D3 v7.8.2 for its comparator utilities.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/dbfd8ae90ec34356ae93da8d7ad56978?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}