I am reading stream data from cosmosdb, it gives results in pageflux which i converted to FluxJust. now i wanted the result to be in JsonObject.
val pagedFlux = container.queryItems(QUERY, queryOptions, classOf[JsonNode])
val cosmosQueryResponseObjectAsAJSONArray = pagedFlux.byPage(preferredPageSize).map(page => Flux.just(page.getResults.stream())).collectList().block()