core/OperationBuilder.js
function fieldInsert(elem, field, val) {
        try {
            $(exports).triggerHandler('fieldInsert', [elem, field, val]);
        } catch (err) {
            console.error(err);
        }
        var array = _getArray(elem, field);
        array.push(val);
        _currentOperation.ops.push({
            op: OP_FIELD_INSERT,
            arg: {
                _id: elem._id,
                f: field,
                e: val._id,
                i: array.indexOf(val)
            }
        });
    }
function fieldInsert(elem, field, val) {
        try {
            $(exports).triggerHandler('fieldInsert', [elem, field, val]);
        } catch (err) {
            console.error(err);
        }
        var array = _getArray(elem, field);
        array.push(val);
        _currentOperation.ops.push({
            op: OP_FIELD_INSERT,
            arg: {
                _id: elem._id,
                f: field,
                e: val._id,
                i: array.indexOf(val)
            }
        });
    }
function fieldInsert ( elem , field , val ) { try { $ ( exports ) . triggerHandler ( 'fieldInsert' , [ elem , field , val ] ) ; } catch ( err ) { console . error ( err ) ; } var array = _getArray ( elem , field ) ; array . push ( val ) ; _currentOperation . ops . push ( { op : OP_FIELD_INSERT , arg : { _id : elem . _id , f : field , e : val . _id , i : array . indexOf ( val ) } } ) ; }
Insert an element to array field.

@param {Element} elem
@param {string} field
@param {?} val
Insert an element to array field .