How to filtering array of objects to another array of objects in js?
问题 I have got two arrays of objects. I want to filter data based on permissionObj. This is coming from database. Here are arrays of sub-arrays in the permissionObj. I need to do another condition in reduce function . For example , if Pubsidebar value is token is public, I want to keep static content {label: "test",value: "public"} without filtering with permissionObj and if other key and value is match with permissionObj,then it will be push inside token . let permissionObj = [ { 'OA deal': [ {