android-components / mozilla.components.support.ktx.android.org.json / org.json.JSONObject / tryGetString

tryGetString

fun JSONObject.tryGetString(key: String): String? (source)

Returns the value mapped by {@code key} if it exists, and if the value returned is not null. If it's null, it returns null