Measurements of the hadronic activity and the electroweak production in events with a Z boson and two jets in proton-proton collisions with the CMS experiment