[android-components](../index.md) / [mozilla.components.support.ktx.android.org.json](index.md) / [mergeWith](./merge-with.md)

# mergeWith

`fun <ERROR CLASS>.mergeWith(other: <ERROR CLASS>): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) [(source)](https://github.com/mozilla-mobile/android-components/blob/master/components/support/ktx/src/main/java/mozilla/components/support/ktx/android/org/json/JSONObject.kt#L69)

Merge the contents of another [JSONObject](#) with this object,
overwriting the colliding keys.

### Parameters

`other` - the [JSONObject](#) providing the data to be
    merged with this one.