jsonQ.js
function() {
            var arg = arguments,
                target = [],
                flag,
                ln = arg.length;

            if (ln == 1) {
                target = arg[0];
            } else {
                for (var j = 0, aryLn = arg[0].length; j < aryLn; j++) {
                    var elm = arg[0][j];
                    flag = 1;
                    for (var i = 1; i < ln; i++) {
                        if (jsonQ.index(arg[i], elm) == -1) {
                            flag = 0;
                            break;
                        }
                    }
                    if (flag == 1) {
                        target.push(elm);
                    }

                }
            }
            return target;
        }
function() {
            var arg = arguments,
                target = [],
                flag,
                ln = arg.length;

            if (ln == 1) {
                target = arg[0];
            } else {
                for (var j = 0, aryLn = arg[0].length; j < aryLn; j++) {
                    var elm = arg[0][j];
                    flag = 1;
                    for (var i = 1; i < ln; i++) {
                        if (jsonQ.index(arg[i], elm) == -1) {
                            flag = 0;
                            break;
                        }
                    }
                    if (flag == 1) {
                        target.push(elm);
                    }

                }
            }
            return target;
        }
function ( ) { var arg = arguments , target = [ ] , flag , ln = arg . length ; if ( ln == 1 ) { target = arg [ 0 ] ; } else { for ( var j = 0 , aryLn = arg [ 0 ] . length ; j < aryLn ; j ++ ) { var elm = arg [ 0 ] [ j ] ; flag = 1 ; for ( var i = 1 ; i < ln ; i ++ ) { if ( jsonQ . index ( arg [ i ] , elm ) == - 1 ) { flag = 0 ; break ; } } if ( flag == 1 ) { target . push ( elm ) ; } } } return target ; }
return intersection of array in new array
return intersection of array in new array