function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
GB3GB3 

jsforce - get full object data response from command line

I'm using jsforce to query a salesforce from the command line

When I do query that has nested values, how do I show the object data?

For example, I want to get the contacts for an account...

At the command line I type:
> query("select name, (select lastname from contacts) from account")



The result I get is:
{ totalSize: 4,
  done: true,
  records:
   [ { attributes: [Object],
       Name: 'Acme (Sample)',
       Contacts: [Object] },
     { attributes: [Object],
       Name: 'Global Media (Sample)',
       Contacts: [Object] },
     { attributes: [Object],
       Name: 'salesforce.com (Sample)',
       Contacts: [Object] } ] }
How can I I get the full json response for the contacts (i.e., list of contact data), rather than just "[Object]"?

Thank you.