[utils] js_to_json: various improvements