{"ScriptPreparationCode":"\r\nvar querystring = \u0027foo=bar\u0026baz=qux\u0026quxx=corge\u0026grault=garply\u0026waldo=fred\u0026plugh=xyzzy\u0027\r\n\r\nvar queryobj = {\r\n foo: \u0027bar\u0027,\r\n baz: \u0027qux\u0027,\r\n quux: \u0027corge\u0027,\r\n grault: \u0027garply\u0027,\r\n waldo: \u0027fred\u0027,\r\n plugh: \u0027xyzzy\u0027\r\n}\r\n\r\nfunction encode (data) {\r\n let result = \u0027?\u0027\r\n\r\n for (const key in data) {\r\n if (data[key] != null) {\r\n result \u002B= key \u002B \u0027=\u0027 \u002B data[key] \u002B \u0027\u0026\u0027\r\n }\r\n }\r\n\r\n return result.slice(0, -1)\r\n}\r\n\r\nfunction encodeNative (data) {\r\n return new URLSearchParams(data).toString()\r\n}\r\n","TestCases":[{"Name":"Custom Encode","Code":"encode(queryobj)","IsDeferred":false},{"Name":"Native Encode","Code":"encodeNative(queryobj)","IsDeferred":false}]}