GitHubジョブAPIからジョブを取得するために小さなNodeアプリケーションを作成しました。私はこれを行うにはrequest
モジュールを使用しています。私はそれだけで[object, Object]
を印刷した瞬間に、JSONオブジェクトを印刷するあなたの助けをいただければ幸いですNode.jsを使用したJSONオブジェクトの印刷
const request = require("request");
const url ="https://jobs.github.com/positions.json?search=remote";
request.get(url, (error, response, body) => {
let json = JSON.parse(body);
console.log(
`Data: ${json}`,
);
});
:あなたは以下のコードを見ることができます。