There was an error in evaluating the Pre-request Script: Error: Cannot read property 'name' of undefined
var limit = 50;
pm.sendRequest(getComponentsNewURL, function (err, response) {
var jsonData = response.json();
console.log(jsonData.contents[0].name); // able to get name here
for (var i = 0; i < limit; i++) {
if (jsonData.contents[i].name == 'MyHTMLComponentName') {
component_id = jsonData.contents[i].id;
console.log('component_id= ',component_id);
}
if(component_id){break};
}
});