I have two struct and two arrays corresponding to it and I am trying to compare the two array values and print it in one filtered array i did try and use filter but its giving m
If you're looking to filter oneData to only those elements that have a matching ID field in twoData, you want:
oneData
twoData
let mainArray = oneData.filter { i in twoData.contains { i.ID == $0.ID } }