I think here you could introduce some variables

    val baseMapping = ...
    val extensions = mapping.extensions.map(_.mappingJson)
    (baseMapping /: extensions) {_ ++_} // or (extensions foldLeft baseMapping) {_ ++ _} or baseMapping /: extensions apply (_ ++ _)