Category : filter

In the code, I am getting an array of objects from the observable and I want to check a value from an object of that array and return a different value from the same object if the condition is satisfied. How can I do that? here is the code: addresses$ = this.addressData$.pipe(map((addressData)=>{ addressData.filter((data)=> {data.deviceType === ..

Read more

Currently, I am able to search for a hall by typing anything that is within a hall container (including name, location, capacity), however, I only want to be able to filter results for searches for a hall name. <div id="searchFilter" class="flexColumn"> <label for="searchFilterText">Search for Community Halls</label> <input type="text" id="searchFilterText" placeholder="Search for the name of a ..

Read more

I have an array const newChecked = ["recreational", "charity"] and an object const allActivities = [ {activity: ‘…’, type: ‘social’, }, {activity: ‘…’, type: ‘social’, }, {activity: ‘…’, type: ‘charity’, }, {activity: ‘…’, type: ‘recreational’, }, ] And I want to get a new object, that does not contain type that are contains in newChecked. ..

Read more