Creating Object map in node.js

Creating an Object map in node.js and how can we access the static and dynamic objects.

Suppose we have a Object Map like below:

var myBooks = {

When you run above code, it will print below output i.e array of the objects.



So here, using dot(.) operator we can access the array of objects.


The above code will print the following output:

{ copies: 200, cost: ‘$6,000’ }  //first console.log
200 //second console.log

But what if i do not know the object i have to access?

Here is how we can get the object values then,

var choice = "fantasy";


This will produce output as 300


2 thoughts on “Creating Object map in node.js

  1. Nice blog right here! Also your web site loads up very fast! What host are you the usage of? Can I am getting your associate hyperlink for your host? I desire my web site loaded up as quickly as yours lol


  2. Valuable info. Fortunate me I discovered your site by chance, and I am stunned why this coincidence did not happened in advance! I bookmarked it.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s