Hi! Is it possible to select a specific `forEach` ...
# announcements
w
Hi! Is it possible to select a specific
forEach
loop when you have multiple of such loops? For example:
Copy code
directories.forEach {
    var currentFile = it

    urlPieces.forEach {
        if(currentFile.isDirectory) {

        } else if(currentFile.nameWithoutExtension == urlPieces.last()) {
            documents.add(currentFile)
        } else {
            return@forEach
        }
    }
}
How could I make sure to only return to the second forEach and not the first one?