code: public static JSONArray nodesToJSON(Collection<Node> s) {
          JSONArray a = new JSONArray();
          for (Element e : s) {
              a.add(e.id());
          }
          return a;
      }
docs: Convert a collection nodes to an array of nodes identifiers.
  
  @param s the VMs
  @return a json formatted array of integers