get
Calls to the function will be translated to indexing operation (square brackets) on the receiver with propertyName as the argument.
E.g. for next code:
fun test(j: Json, p: String) = j["prop"] + j.get(p)
Content copied to clipboard
will be generated:
function test(j, p) {
return j["prop"] + j[p];
}
Content copied to clipboard