javascript map with ordered structure