数组去重
    https://juejin.im/post/5ced4613f265da1bb96fbe68#heading-4
    引用类型去重

    1. var arr = [{
    2. "name": "ZYTX",
    3. "age": "Y13xG_4wQnOWK1QwJLgg11d0pS4hewePU95UHtpMl3eE81uS74NC-6zu-Rtnw4Ix",
    4. "gender": "AAAAAA.doc"
    5. }, {
    6. "name": "ZYTA",
    7. "age": "Y13xG_4wQnOWK1QwJLgg11d0pS4hewePU95UHtpMl3eE81uS74NC-6zu-Rtnw4Ix",
    8. "gender": "BBBBBB.doc"
    9. }, {
    10. "name": "ZDTX",
    11. "age": "Y13xG_4wQnOWK1QwJLgg11d0pS4hewePU95UHtpMl3eE81uS74NC-6zu-Rtnw4Ix",
    12. "gender": "CCCCCC.doc"
    13. }, {
    14. "name": "ZYTX",
    15. "age": "Y13xG_4wQnOWK1QwJLgg11d0pS4hewePU95UHtpMl3eE81uS74NC-6zu-Rtnw4Ix",
    16. "gender": "AAAAAA.doc"
    17. }];
    18. var hash = {};
    19. arr = arr.reduce(function(item, next) {
    20. hash[next.name] ? '' : hash[next.name] = true && item.push(next);
    21. return item
    22. }, [])
    23. console.log(arr);