Skip to content
Discussion options

You must be logged in to vote

Hmm, I need a flatten operator for data arrays it seems. You can hack it for now like this:

let groups = dv.pages("#restaurant").flatMap(page => page.type.map(t => Object.assign({}, page, { type: t })))
    .groupBy(page => page.type);

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
8 replies
@HyperEpsilon
Comment options

@AB1908
Comment options

@HyperEpsilon
Comment options

@AB1908
Comment options

@HyperEpsilon
Comment options

Answer selected by awlobo
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants