Flattens the object msgStructure and returns the indices of names given in msgNames
msgStructure
msgNames
Returns in same order as given names in msgNames
Flattens the object
msgStructure
and returns the indices of names given inmsgNames