Structure and properties of confined sodium nitrite