Advertisement
corzopabloariel

Ale

Jun 30th, 2020
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function validar(nose, search) {
  2.     let aux = nose.product.filter(x => {
  3.         if(x.industrias.indexOf(search) >= 0 || x.udenegocios.indexOf(search) >= 0)
  4.             return x;
  5.     });
  6.     return aux.length !== 0;
  7. }
  8. search = 5;
  9. json.child_categories.filter(x => {
  10.     if (validar(x, search))
  11.         return x;
  12. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement