"use strict"; const rds = 'http://messa020ec.infineon.com:8080/api/oiWizard/materials/rds/1005602'; let workItemCollection = []; await fetch(rds) .then((res) => res.text()) .then((text) => { const records = JSON.parse(text); if (records != undefined) { if (records != undefined) { } } }) .catch((e) => console.error(e)); workItemCollection.forEach(element => { console.log(`{"Id": "${element.Id}", "State": "${element.State}", "ClosedDate": "${element.ClosedDate}", "TargetDate": "${element.TargetDate}", "IterationPath": "${element.IterationPath}", "AssignedTo": "${element.AssignedTo}", "Title": "${element.Title}"},`); });