79114915

Date: 2024-10-22 15:58:53
Score: 1
Natty:
Report link

You don't need a function for this, as you can just use the JavaScript filter function on the axes array.

This will create a new array with the filtered objects.

const response = pm.response.json();

let search = response.axes.filter(obj => 
    obj.is_validation_required === false && 
    obj.additionnal_day_allowed === true && 
    obj.remaining_days > 0);

console.log(search);

Console Log

Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: mikee