{"id":1182,"date":"2022-01-12T18:13:46","date_gmt":"2022-01-12T18:13:46","guid":{"rendered":"http:\/\/www.netexl.com\/blog\/?p=1182"},"modified":"2026-04-02T09:27:12","modified_gmt":"2026-04-02T09:27:12","slug":"hashmap-in-javascript","status":"publish","type":"post","link":"https:\/\/www.netexl.com\/blog\/hashmap-in-javascript\/","title":{"rendered":"Hashmap in Javascript"},"content":{"rendered":"\n<p>Something like a Hashmap can be easily done in javascript as following<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>let map = {};\n\n\/\/ add values to the map\nmap&#91;'key1'] = 1;\nmap&#91;'key1'] = 2;\nmap&#91;'key1'] = 3;\n\n\/\/ iterate map\nfor (let key in map) {\n    if (map.hasOwnProperty(key)) {\n        let d = map&#91;key];\n        console.log(d);\n\n    }\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Something like a Hashmap can be easily done in javascript as following<\/p>\n","protected":false},"author":5,"featured_media":1539,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[33,14,24,22],"tags":[],"class_list":["post-1182","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-code","category-how-to","category-javascript","category-quick-tip"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.netexl.com\/blog\/wp-json\/wp\/v2\/posts\/1182","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.netexl.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.netexl.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.netexl.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.netexl.com\/blog\/wp-json\/wp\/v2\/comments?post=1182"}],"version-history":[{"count":1,"href":"https:\/\/www.netexl.com\/blog\/wp-json\/wp\/v2\/posts\/1182\/revisions"}],"predecessor-version":[{"id":1183,"href":"https:\/\/www.netexl.com\/blog\/wp-json\/wp\/v2\/posts\/1182\/revisions\/1183"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.netexl.com\/blog\/wp-json\/wp\/v2\/media\/1539"}],"wp:attachment":[{"href":"https:\/\/www.netexl.com\/blog\/wp-json\/wp\/v2\/media?parent=1182"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.netexl.com\/blog\/wp-json\/wp\/v2\/categories?post=1182"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.netexl.com\/blog\/wp-json\/wp\/v2\/tags?post=1182"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}