code: public JsonArray toJsonArray(JsonArray names) throws JsonException {
          JsonArray result = new JsonArray();
          if (names == null) {
              return null;
          }
          int length = names.length();
          if (length == 0) {
              return null;
          }
          for (int i = 0; i < length; i++) {
              String name = Util.toString(names.opt(i));
              result.put(opt(name));
          }
          return result;
      }
docs: Returns an array with the values corresponding to {@code names}. The
  array contains null for names that aren't mapped. This method returns
  null if {@code names} is either null or empty.