Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function validar(nose, search) {
- let aux = nose.product.filter(x => {
- if(x.industrias.indexOf(search) >= 0 || x.udenegocios.indexOf(search) >= 0)
- return x;
- });
- return aux.length !== 0;
- }
- search = 5;
- json.child_categories.filter(x => {
- if (validar(x, search))
- return x;
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement