I've a logical problem, and I want to solve it with optimised way
Advertisements This will be accepted value which should be as an array : Input: const x = [ "name_new", "name_test_new", "xyz_new", "xyz_abc_rest_edit", ] This is the putout of input, I’m expecting, Output: const y = { "name":{ "new":true, }, "name_test":{ "new":true, }, "xyz":{ "new":true, }, "xyz_abc_rest":{ "edit":true, }, } Here Input could be anything similar… Read More I've a logical problem, and I want to solve it with optimised way