Example Filter,sort,map Observable stream
Example 1 sort array of object alphapitaclly . Array of countries findAllCountry ( token : string ): Observable < ICountry []> { const headerInfo = new HttpHeaders ({ Authorization : token , }); return this . http . get < ICountry []>( ` ${ environment . backendUrl } /crm-operations/lookup/country` , { headers : headerInfo } ) . pipe ( tap (( data ) => data . sort (( a , b ) => { if ( a . couShortNameE < b . couShortNameE ) { return - 1 ; } if ( a . couShortNameE > b . couShortNameE ) { return 1 ; } }) ) ); } Example 2 async findAll ( token : string ): Promise < Observable < ComprehensiveLimit []>> { let customer = await getSessionInfo ( "customer" ); const headerInfo = new HttpHeaders ({ Auth