I'm looking for a javascript library which can run in the browser and perform pivot/reshape/aggregation operations.

For instance let's I have data like:

        { category: "Toy", sub: "puzzle", product: "A",price: 10 },
        { category: "Toy", sub: "puzzle", product: "B",price: 30 },
        { category: "Toy", sub: "videogame", product: "C",price: 50 },
        { category: "Equipment", sub: "Bike", product: "D",price: 50 },

I'd like to be able to do something like library(data).pivot(rows=["category"],columns=["sub"],values={"count":"count","price":"avg"}) and have it return new data with the new pivot shape.

I found UI libraries which do this (eg Ag-Grid) but I would like a library which focuses on data only, so I can use any UI library I want to render the result.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.