Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

143
Views
Cómo agregar una consulta para verificar si una de las 2 cadenas contiene la clave buscada

Mi código se parece a esto:

 this.cashRegisterService .query({ 'storeName.contains': event.query, 'identifier.contains': event.query, }) .subscribe(data => { this.cashregisters = (data.body || []).map(cashRegister => ({ id: cashRegister.id, name: `${cashRegister.identifier} ${cashRegister.storeName} (${cashRegister.mallName})`, })); });

Quiero verificar si el identificador O el nombre de la tienda contienen event.query, pero lo que hace es verificar si ambos contienen event.query. ¿Cómo puedo hacer eso? el método es generado por jhipster

 query(req?: any): Observable<EntityArrayResponseType> { const options = createRequestOption(req); return this.http.get<ICashRegister[]>(this.resourceUrl, { params: options, observe: 'response' }); } export const createRequestOption = (req?: any): HttpParams => { let options: HttpParams = new HttpParams(); if (req) { Object.keys(req).forEach(key => { if (key !== 'sort') { options = options.set(key, req[key]); } }); if (req.sort) { req.sort.forEach((val: string) => { options = options.append('sort', val); }); } } return options; };
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!