fix array output in Misc::prepareForJson