Twig string variable changing to int(0) I have twig variables inside an array called social_media that contain colors. 
When I perform {{ dump(social_media) }} I can see all the information like so

array(10) {
["facebook"]=&gt; string(39) "https://www.facebook.com/myfacebook/"
["facebook-color"]=&gt; string(7) "#2d5f9d"
["twitter"]=&gt; string(33) "https://twitter.com/mytwitter"
["twitter-color”] =&gt; string(7) "#51acef"
["youtube"]=&gt; string(56) "https://www.youtube.com/channel/myyoutube"
["youtube-color"]=&gt; string(7) "#e52d27"
["instagram"]=&gt; string(35) "https://instagram.com/myinstagram"
["instagram-color"]=&gt; string(7) "#f77737"
["linkedin"]=&gt; string(83) "https://www.linkedin.com/company/mylinkedin"
["linkedin-color"]=&gt; string(7) "#0077b5" 
}


Performing {{ social_media.facebook }} works fine like so

https://www.facebook.com/myfacebook/


but {{ social_media.facebook-color }} outputs 

int(0)


In fact every single color variable outputs this same value, while the others work fine. I considered the possibility that the # was causing a problem, but changing the colors to colors like 'Black' or 'Red' as a test, but I received the same outcome. I even tried using 

{{ social_media.facebook-color|raw }}


But that did not have any effect. What could possibly cause some of my twig variables to only output int(0) while others output just fine?
It turns out that twig can't handle hyphens in their variable names.
Changing the variable names from

{{ social_media.facebook-color }}


to 

{{ social_media.facebook_color }}


resolved the issue