'How can I have access to an API data on nodeJS or juste JS from a curl request on the command line?

I need to make a request to an API, on the documentation it tells me to use CURL.

I did that on command, and it worked fine.

My question is how can I use the result on a program ? I mean by that using the json data on a nodejs program to do some action on it. Like posting the data on a CRM for instance.

Thank you for your help



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source