Advertisement
Guest User

Untitled

a guest
Jul 16th, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. const colheaders = Object.keys(rows[0]);
  2. const errors=[];
  3. const regexpArray=[];
  4. rows.forEach((row,rowindex)=>{
  5. errors[rowindex]=[];
  6. Object.values(row).forEach((val,colindex)=>{
  7. if(regexpArray[colindex] && regexpArray[colindex].test(val)){
  8. errors[rowindex].push(colheaders[colindex]);
  9. }
  10. })
  11. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement