Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const findTheUsable = (data) => {
- // const usableArray = data.map(user=>user.usable).flat()
- // your code ends here
- return data.filter(user=>user.usable.filter((key)=>{
- let acc = {}
- if(Object.keys(user).includes(key)){
- acc[key] = user.key
- }
- return acc
- }))
- }
Advertisement
Add Comment
Please, Sign In to add comment