return the name in the object by taking the id value in array of objects typescript code example Example: get all the ids in an array of objects ts array.map(s=>s.id)