Check out example codes for "compare list from db and list from request". It will help you in understanding the concepts better.

Code Example 1

List<String> compareObjects(PartInfo filePart, PartInfo dbPart) {
    List<String> different = new LinkedList<String>();

    if (!filePart.getNumber().equals(dbPart.getNumber())) {
        different.add("number");
    }
    //repeat for all your fields
    return different;
}


#Note: Check differences for each field ob each object from 2 list only

Learn ReactJs, React Native from akashmittal.com