SHARE
TWEET

Untitled

a guest Jun 16th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. cy.filter(".myselector")
  2.      
  3. 0: ua {0: ua, length: 1, _private: Object, instanceString: function, spawn: function, spawnSelf: function, …}
  4.  
  5. 1: ua {0: ua, length: 1, _private: Object, instanceString: function, spawn: function, spawnSelf: function, …}
  6.  
  7. 2: ua {0: ua, length: 1, _private: Object, instanceString: function, spawn: function, spawnSelf: function, …}
  8.  
  9. _private: {cy: Wa, map: Map}
  10.  
  11. length: 3
  12.      
  13. var entire_object, no_of_objects, objects_array = [];
  14. entire_object = cy.filter(".myselector"); //returns a complex object
  15. no_of_objects = entire_object.length; //the number of cytoscape nodes matching the 'myselector' filter
  16.  
  17. for (var i = 0; i < no_of_objects; i++){
  18.   object_name = {};
  19.   object_name = entire_object[i]._private.data.name;
  20.   objects_array.push(object_name);
  21. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top