JS backend: fix KT-6112 jsonFromTuples is broken

#KT-6112 Fixed