{"ScriptPreparationCode":"var myObject = {\r\n arr1: [[1, 2, 3, 4], [5, 6, 7, 8]],\r\n arr2: [[1, 2 ,27, 28], [26, 23, 22, 8]],\r\n arr3: [[7, 9, 11, 12], [14, 15, 16, 17]],\r\n}\r\n\r\nvar myData = {\r\n ids: myObject,\r\n map: {\r\n 1: \u00271\u0027,\r\n 2: \u00272\u0027,\r\n 3: \u00273\u0027,\r\n 4: \u00274\u0027,\r\n 5: \u00275\u0027,\r\n 6: \u00276\u0027,\r\n 7: \u00277\u0027,\r\n 99: \u002799\u0027,\r\n 8: \u00278\u0027,\r\n 9: \u00279\u0027,\r\n 11: \u002711\u0027,\r\n 12: \u002712\u0027,\r\n 13: \u002713\u0027,\r\n 14: \u002714\u0027,\r\n 15: \u002715\u0027,\r\n 16: \u002716\u0027,\r\n 17: \u002717\u0027,\r\n 18: \u002718\u0027,\r\n 19: \u002719\u0027,\r\n 20: \u002720\u0027,\r\n 21: \u002721\u0027,\r\n 22: \u002722\u0027,\r\n 23: \u002723\u0027,\r\n 24: \u002724\u0027,\r\n 25: \u002725\u0027,\r\n 26: \u002726\u0027,\r\n 27: \u002727\u0027,\r\n 28: \u002728\u0027,\r\n 29: \u002729\u0027,\r\n }\r\n}\r\n\r\n","TestCases":[{"Name":"Lodash","Code":"_.pick(myData.map, _(myObject).map(k =\u003E k).flatten().flatten().uniq().value())","IsDeferred":false},{"Name":"Plain JS ","Code":"const createNewMapObj = (oldMap, myObject) =\u003E {\r\n const retObj = {};\r\n Object.keys(myObject).forEach((k) =\u003E {\r\n myObject[k].forEach((v) =\u003E {\r\n v.forEach((v) =\u003E {\r\n retObj[v] = oldMap[v];\r\n });\r\n });\r\n });\r\n return retObj;\r\n}\r\n\r\nconst myNewData = {\r\n ids: myObject,\r\n map: createNewMapObj(myData.map, myObject),\r\n}","IsDeferred":false}]}