The New York Giants snapped their six-game losing streak with a 23-7 victory over fellow strugglers Minnesota Vikings.