param detectorIndex param entities export const getCriteriaFields = ( detectorIndex , entities ) => { const nonBlankEntities = entities . filter ( ( entity ) => entity . fieldValue !== null ) ; return [ { fieldName : 'detector_index' , fieldValue : detectorIndex , } , ... nonBlankEntities , ] ; } ;