It is easy, once you realize that
THERE IS NO SUCH THING AS A "JSON OBJECT"!
It is just an object. Maybe you once had a string with some JSON, but from your code it is clear it has been parsed into a Javascript object. And so it acts like every other Javascript object.
Use brackets:
var test2 = data.dagar[dayNr]['workfree day'];
The "dotted notation" you used in the first example is a convenience. You can only use it if there are no spaces in the property name.