Update Array Object With Spread Operator Kotlin Vs Scala