0

So I'm currently working on a project with Teamwork API. I'm really new to this and also Javascript so bear with me haha. I generated some code from the Teamwork API and I can show data in the console log. In the console log you can see all the data that includes certain companies that are linked to your Teamwork Account. I'm also figuring out how I can get the names of the companies and leave out all the other data. Thanks in advance.

So basically turn the Console log into a div and get the names of the companies

https://developer.teamwork.com/projects/api-v1/ref/companies/get-companies-json

var request = require("request");

var options = { method: 'GET', url: '-', headers: {authorization: '-'} };

request(options, function (error, response, body) { if (error) throw new Error(error);

console.log(body); });

  • Can you also include the JSON body object from which you want to get companies data? – Waleed Ahmad Nov 24 '21 at 11:06
  • {"company":{"state":"","email_one":"","profile-text":"","email_three":"","contacts":"0","website":"","logo-URL":"","email_two":"","cid":"","phone":"","accounts":"0","company_name_url":"","can_see_private":false,"tags":[],"zip":"","industryId":"","id":"","fax":"","address_two":"","name":"","country":"","isowner":"0","private-notes-text":"","industry":"","address_one":"","countrycode":"","clientUsers":"0","city":""},"STATUS":"OK"} This is what I get from the console log, I left all the information from the company itself out of it – Bart Scholten Nov 24 '21 at 14:11
  • Please provide enough code so others can better understand or reproduce the problem. – Community Nov 28 '21 at 17:30

0 Answers0