Hello all. I was wondering if there was a way to d...
# javascript
p
Hello all. I was wondering if there was a way to do
delete myJson['myField'];
in Kotlin JS (Legacy) on a field of a
kotlin.js.Json
. I didn't find anything about it. Any help would be much appreciated.
b
js("delete myJson['myField']")
works everywhere
I'm not aware of anything less hacky
t
Copy code
import kotlinext.js.delete

delete(myJson["myField"])
K 3
mind blown 2
🙌 2
✅ 2
p
Thanks a lot !
t
b
Ah, it's not part of stdlib. Explains why I've missed this gem.