Hello, I am working with a dataset where I need to filter the data based on my userID and display only that specific information in a list. Can someone assist me with this? TS:
getDicomList() {
this.service.getDicomList(params)
.subscribe((res) => {
this.dicomLists = res.Body.Data.dicomList;
console.log(this.dicomLists, "shghds")
let ids = this.dicomLists.map(item => item.CreatedBy);
let filteredData = this.dicomLists.filter(item => ids.indexOf(item.CreatedBy) === -1);
})
I need to compare my userID with item.CreatedBy.
Console:
(10) [{…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}]
0: {StudyInstanceUID: "999.999.1.19941016.83000", StudyID: "ACC99", SeriesNumber: "2", AcquisitionNumber: "0", InstanceNumber: "101", …}
1: ............(content truncated for brevity)............
9: {StudyInstanceUID: "1.3.6.1.4.1.18047.1.11.10021841473447061672", StudyID: "", SeriesNumber: "4", AcquisitionNumber: "1", InstanceNumber: "49", …}
length: 10
__proto__: Array(0)