[ https://issues.apache.org/jira/browse/ARROW-2202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17659230#comment-17659230 ]
Rok Mihevc commented on ARROW-2202: ----------------------------------- This issue has been migrated to [issue #18166|https://github.com/apache/arrow/issues/18166] on GitHub. Please see the [migration documentation|https://github.com/apache/arrow/issues/14542] for further details. > [JS] Add DataFrame.toJSON > ------------------------- > > Key: ARROW-2202 > URL: https://issues.apache.org/jira/browse/ARROW-2202 > Project: Apache Arrow > Issue Type: Improvement > Components: JavaScript > Reporter: Brian Hulette > Priority: Major > > Currently, {{CountByResult}} has its own [{{toJSON}} > method|https://github.com/apache/arrow/blob/master/js/src/table.ts#L282], but > there should be a more general one for every {{DataFrame}}. > {{CountByResult.toJSON}} returns: > {code:json} > { > "keyA": 10, > "keyB": 10, > ... > }{code} > A more general {{toJSON}} could just return a list of objects with an entry > for each column. For the above {{CountByResult}}, the output would look like: > {code:json} > [ > {value: "keyA", count: 10}, > {value: "keyB", count: 10}, > ... > ]{code} -- This message was sent by Atlassian Jira (v8.20.10#820010)