Javascript object that maps keys to value & allows iteration over keys
<p>I need to create object in javascript that allows to fetch values using keys &amp; also iterate over keys.  The primary requirement is fetching value by key but iteration is required to maintain sort order of entries by values(integer). </p>

<p>How do I go about creating such an object ? </p>
