Arizona ended its five-game losing streak with a 27-17 win over Dallas, tightening the NFC race entering midseason.