Probeer alleen de tekenreeks van { tot } in te voeren zonder de voorgaande regels.
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