{"ScriptPreparationCode":"var array = [\r\n {\r\n \u0022code\u0022: \u0022FACEBOOK\u0022,\r\n \u0022description\u0022: \u0022Find us on Facebook\u0022,\r\n \u0022value\u0022: \u0022https://www.facebook.com/CDBPLC\u0022\r\n },\r\n {\r\n \u0022code\u0022: \u0022LINKEDIN\u0022,\r\n \u0022description\u0022: \u0022Find us on Linkedin\u0022,\r\n \u0022value\u0022: \u0022https://www.linkedin.com/company/citizens-development-business-f\u0022\r\n },\r\n {\r\n \u0022code\u0022: \u0022CALL_CENTER_TEL\u0022,\r\n \u0022description\u0022: \u0022Call center\u0022,\r\n \u0022value\u0022: \u00220112380380\u0022\r\n },\r\n {\r\n \u0022code\u0022: \u0022FAX\u0022,\r\n \u0022description\u0022: \u0022Fax\u0022,\r\n \u0022value\u0022: \u0022011222555\u0022\r\n },\r\n {\r\n \u0022code\u0022: \u0022INSTAGRAM\u0022,\r\n \u0022description\u0022: \u0022Find us on Instagram\u0022,\r\n \u0022value\u0022: \u0022https://www.instagram.com/cdb.srilanka/\u0022\r\n },\r\n {\r\n \u0022code\u0022: \u0022ADDRESS\u0022,\r\n \u0022description\u0022: \u0022Address\u0022,\r\n \u0022value\u0022: \u0022123, Orabipasha Mawatha, Colombo 10\u0022\r\n },\r\n {\r\n \u0022code\u0022: \u0022TEL_NO\u0022,\r\n \u0022description\u0022: \u0022Our Hotlines\u0022,\r\n \u0022value\u0022: \u0022\u002B94 117 388 000\u0022\r\n },\r\n {\r\n \u0022code\u0022: \u0022EMAIL\u0022,\r\n \u0022description\u0022: \u0022Email us\u0022,\r\n \u0022value\u0022: \u0022customercare@cdb.lk\u0022\r\n },\r\n {\r\n \u0022code\u0022: \u0022COMP_NAME\u0022,\r\n \u0022description\u0022: \u0022Company Name\u0022,\r\n \u0022value\u0022: \u0022Citizens Development Business Finance PLC\u0022\r\n },\r\n {\r\n \u0022code\u0022: \u0022WEB\u0022,\r\n \u0022description\u0022: \u0022Find us\u0022,\r\n \u0022value\u0022: \u0022https://www.cdb.lk/\u0022\r\n }\r\n ];\r\n\r\nvar orderOfDetailArr = [\r\n { code: \u0027COMP_NAME\u0027,icon:\u0027icon-company\u0027 },\r\n { code: \u0027ADDRESS\u0027,icon:\u0027icon-locator\u0027 },\r\n { code: \u0027TEL_NO\u0027,icon:\u0027icon-phone-ring\u0027 },\r\n { code: \u0027CALL_CENTER_TEL\u0027,icon:\u0027icon-phone-ring\u0027 },\r\n { code: \u0027FAX\u0027,icon:\u0027icon-fax\u0027 },\r\n { code: \u0027EMAIL\u0027,icon:\u0027icon-envlop\u0027 },\r\n { code: \u0027WEB\u0027,icon:\u0027icon-website\u0027 },\r\n ]\r\n\r\nvar contactCode = orderOfDetailArr.map(({code})=\u003Ecode);","TestCases":[{"Name":"find","Code":"\r\n array.filter((o1) =\u003E orderOfDetailArr.some((o2) =\u003E o1.code === o2.code? o1.contact=o2.icon:\u0027\u0027))\r\n .sort(\r\n (a, b) =\u003E\r\n contactCode.indexOf(a.code) - contactCode.indexOf(b.code)\r\n );","IsDeferred":false},{"Name":"some","Code":"array.filter((o1) =\u003E {\r\n const found = orderOfDetailArr.find(x =\u003E x.code === o1.code);\r\n\r\n if (found) {\r\n o1.contact = found.icon;\r\n return true;\r\n }\r\n\r\n return false;\r\n })","IsDeferred":false}]}