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