{"ScriptPreparationCode":"function translateBySpread (a) {\r\n const b = {\r\n ...(a.id \u0026\u0026 { id: a.id }),\r\n ...(a.foo \u0026\u0026 { foo: a.foo})\r\n }\r\n return b;\r\n}\r\n\r\nfunction translateByTernary (a) {\r\n const b = {\r\n ...(a.id ? { id: a.id } : {}),\r\n ...(a.foo ? { foo: a.foo} : {})\r\n }\r\n return b;\r\n}","TestCases":[{"Name":"spread ternary","Code":"translateByTernary({ id: \u002712345\u0027, type: \u0027article\u0027 });","IsDeferred":false},{"Name":"spread \u0026\u0026","Code":"translateBySpread({ id: \u002712345\u0027, type: \u0027article\u0027 });","IsDeferred":false}]}