LEON
LEON

Reputation: 73

Export selected node and edge in cytoscape.js

is there a way that I can export selected node and edge from graph and display the selected ones in another graph. maxkfranz said that we can export as json. Do you have any idea how I can do that? Thanks。

Upvotes: 5

Views: 2824

Answers (1)

maxkfranz
maxkfranz

Reputation: 12242

Have you tried something along the lines of:

cy.$(':selected').json()

Edit : The API now also allows for multiple elements, e.g. cy.$(':selected').jsons()

Upvotes: 6

Related Questions