title: Consuming data of restAPI using Node
body: <p>I am calling below restAPI using node JS.</p>
  
  <p><a href="https://i.stack.imgur.com/tJa8q.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tJa8q.png" alt="enter image description here"></a></p>
  
  <p>I am using below code.</p>
  
  <pre><code>var Request = require("request");
  Request.get("http://localhost:8080/ords/hr/rest-v3/item/Sugar", (error, response, body) =&gt; {
  
      if (error) {
          return console.dir(error);
      }
  
      console.log(response.body);
  });
  </code></pre>
  
  <p>It is giving below output which is correct.</p>
  
  <pre><code>{"items":[{"itemid":101,"itemname":"Sugar","itemcost":32.5}],"hasMore":false,"limit":0,"offset":0,"count":1,"links":[{"rel":"self","href":"http://localhost:8080/ords/hr/rest-v3/item/Sugar"},{"rel":"describedby","href":"http://localhost:8080/ords/hr/metadata-catalog/rest-v3/item/item"}]}
  </code></pre>
  
  <p>How can I access only <code>itemcost</code>, not entire body. I am new to node so not familiar with many things.
  Can you please help me on that.</p>