vertx/src/main/java/eu/internetofus/common/vertx/AggregationBuilder.java
/**
   * Unwind an element of the document.
   *
   * @param elementPath the name of the element to unwind. It has to be the values
   *                    to access to component on the document.
   *
   * @return this builder.
   */
Unwind an element of the document.
@param elementPath the name of the element to unwind. It has to be the values
to access to component on the document.

@return this builder.
Unwind an element of the document . @param elementPath the name of the element to unwind . It has to be the values to access to component on the document . @return this builder .
public AggregationBuilder unwindPath(String... elementPath) {
    if (elementPath != null && elementPath.length > 0) {
      var path = "$" + elementPath[0];
      this.pipeline.add(new JsonObject().put("$unwind",
          new JsonObject().put("path", path).put("includeArrayIndex", elementPath[0] + "Index")));
      for (var i = 1; i < elementPath.length; i++) {
        path += "." + elementPath[i];
        this.pipeline.add(new JsonObject().put("$unwind",
            new JsonObject().put("path", path).put("includeArrayIndex", elementPath[i] + "Index")));
      }
    }
    return this;
  }
public AggregationBuilder unwindPath ( String ... elementPath ) { if ( elementPath != null && elementPath . length > 0 ) { var path = "$" + elementPath [ 0 ] ; this . pipeline . add ( new JsonObject ( ) . put ( "$unwind" , new JsonObject ( ) . put ( "path" , path ) . put ( "includeArrayIndex" , elementPath [ 0 ] + "Index" ) ) ) ; for ( var i = 1 ; i < elementPath . length ; i ++ ) { path += "." + elementPath [ i ] ; this . pipeline . add ( new JsonObject ( ) . put ( "$unwind" , new JsonObject ( ) . put ( "path" , path ) . put ( "includeArrayIndex" , elementPath [ i ] + "Index" ) ) ) ; } } return this ; }
Unwind an element of the document.
Unwind an element of the document .