Coba masukkan hanya string dari { hingga } tanpa baris sebelumnya.
on mouseUp
set the hideConsoleWindows to true
put shell("C:\mongodb\bin\mongo.exe --eval" && \
quote & "printjson(db.test.findOne())" & quote) into pJSON
put pJSON into fld "a"
put JSONToArray(line 3 to -1 of pJSON) into tArray // <-- this line changed
put tArray["a"] into fld "B"
end mouseUp