• Skip to primary navigation
  • Skip to content
  • Skip to footer
DB 0003 Sometimes it is the people no one imagines anything of who do the things that no one can imagine

      D

      Software Developer

      • Earth

      [JS] Convert an object to an map

      less than 1 minute read

      Simple example of convert an object to a map.

      let obj = {
        name: "John",
        age: 30,
      };
      
      let map = new Map(Object.entries(obj));
      console.log(obj);
      console.log(map);
      console.log(map.get("name"));
      

      Categories: convert, js, map, object

      Updated: October 30, 2021

      Twitter Facebook LinkedIn
      Previous Next

      Comments

      You May Also Enjoy

      [JS] Promise Basics

      less than 1 minute read

      1. Resolve case

      [Node.js] Koa Server initialization with formatter

      1 minute read

      Step 1. Setup packages required

      [Java] Custom HTTP RequestURL XSS Filter

      less than 1 minute read

      Sample to show how to check requestURL and prevent Croos-Site-Script Attack Using common XSS Filter to convert URL to clean string.

      [JS] Slice Strings

      less than 1 minute read

      Example codes of String.slice()