Ambidentate Nitrite Ions
According to Pearsons hard soft [Lewis] acid base principle, hard Lewis acids have a strong affinity for hard Lewis bases and soft Lewis acids have a strong affinity for soft Lewis bases.

Nitrite ion is ambidentate: it can react via the softer nitranion centre to give nitrocompounds, or via a harder oxyanion centre to yield nitrite esters. The ion can discriminate between hard and soft Lewis acid centres.

Note that while hard vs soft comparisons can be made for carefully selected pairs of species and/or reactive centres, the HSAB analysis is NOT general. For more information look in the Chemogenesis webbook section on Pearson's HSAB principle.