Check out example codes for "map of maps c++". It will help you in understanding the concepts better.

Code Example 1

map <typename,map<typename,typename>> mp;
mp[key1].insert(make_pair(key2,value));

Code Example 2

map <typename,map<typename,typename>> mp;
map[key1][key2]=values

Learn ReactJs, React Native from akashmittal.com