I am using a parameter "UnitID" to get data for this particular unit id using following code:
this.unitDetailsService.getUnitDetailsbyId(this.activeUnitId)
I am using this activeUnitId parameter to construct a url to be used in in-memory service using following code:
const url = `${this.unitDetailsUrl}/?unit_id=${unitId}`;
I am getting desired results for unit id values like 1.1, 2.1, 3.1, 3.2 etc. However, I am getting undesired results for unit id values like 1, 2, 3 etc. For unit id 1, I am getting all the values which are related to 1, 1.1, 2.1, 3.1. Similarly for unit id 2, result consists 2, 2.1, 2.2, 3.2. for unit id 3, it is 3, 3.1, 3.2, 3.3, 3.4.
I think it is matching to all those values which consists passed unit id rather than matching exact url. Can someone help me to do an exact match?
equals(unitId)instead ofmatch(unitId), because "2.1", "3.1", and "1" are all a match to "1". However,equals(unitId)will only return results with theunitIdyou give to the api. Can you provide your api code?