I have a map like this:
data = {user.name: "John", user.surname: "Doe", city: "NY"}
I can access the "city" this way:
data.city
Is there a similar way to access the user.name attribute?
Assuming you meant:
data = [ 'user.name':"John", 'user.surname':"Doe", city:"NY" ]
(square brackets for the map definition and quotation marks around the names with dotted keys), I believe that
data.'user.name'
gotta do it