Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Print values of JavaScript Object

I print some results as:

arr.forEach(el => console.log(el));

and I receive results of the form:

{
  x: NamedNode {
    termType: 'NamedNode',
    value: 'http://dbpedia.org/resource/Ajamaru_Lakes_rainbowfish'
  }
}
{
  x: NamedNode {
    termType: 'NamedNode',
    value: 'http://dbpedia.org/resource/Akarotaxis_nudiceps'
  }
}

However, I would like to print only the value of each NamedNode, e.g.
http://dbpedia.org/resource/Ajamaru_Lakes_rainbowfish’

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Could you help me, please?

>Solution :

Try:

arr.forEach(el => console.log(el.x.value));
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading