Listview errors compare help

I need some help ....
I have 3 list views.... putting the comparison result from 2 listviews in listview 3 ...for example here t4pf00 will apear in listview 2 but it is in listview 1 so it will disappear in listview 3.....

All i want when i press on any item(code) in the comparison result it display the hours associted with it from comparison listview (listview 3)

.....

The api response
{
"Fundamental _courses": [
{
"fundamental_course_code": "W2WE00",
"fundamental_course_name": "Name1",
"Hours": 2,
"comptency1": "",
"Requirement": "M",

        "content-A3": "a3 connnt",

    },
    {
        "fundamental_course_code": "M4NS00",
        "fundamental_course_name": "hhho",
        "Hours": 2,
        "comptency1": "A",
        "Requirement": "M",

    },
    {
        "fundamental_course_code": "W9RW00",
        "fundamental_course_name": "اStable",
        "Hours": 2,
        "comptency1": "knwoldge",
        "Requirement": "O",
 
    },
    {
        "fundamental_course_code": "T4WF00",
        "fundamental_course_name": Energy",
        "Hours": 2,
        "comptency1": "manage",
        "Requirement": "O",
     
    },
    {
        "fundamental_course_code": "T4DM00",
        "fundamental_course_name": "INITAP",
        "Hours": 2,
        "comptency1": start",
 
        "Requirement": "O",
        "content-A1": "clean",
      
    },
  
],
"Optional_courses": [
    {
        "optional_course_code": "T1SM00",

        "Hours": 1,

    },
    {
        "optional_course_code": "T1YR00",

        "Hours": 2,

},
{
"optional_course_code": "T1TN00",

        "Hours": 2,


    },
    {
        "optional_course_code": "T4CM00",

        "Hours": 2,


   },
    {
        "optional_course_code": "T2PS00",

        "Hours": 2,

 
    },
   
],
"No of Required courses": 2

}


This question makes no sense.

You mention T4PF00 but it never appears in the JSON you included.

So how did it get into a ListView?

Sorry it is just an example...you can replasce any code with requirement O like ...W9RW00 with T4PF00...ALL I WANT TO COMPARE two lists and the compared list when click on it it apears its related data like hours...

This json i writen is for example because my json is too large ..if it will help to send it i will

Your question is still ambiguous.

A Listview is an awful place to keep a list.

Your data collection is several lists of dictionaries, and you don't say how to match dictionaries.

Are you trying to calculate the difference between two sets of objects?

As said by @ABG your query is not clear.

You have 3 listviews. How do you created? With that json?
Listview 1
Listview 2
Listview 3 what are they? Will all the list view have same datas? If listview 1 contains but in listview 2 will not contain then what about listview3? Just by a single post you created so many how, what type of q's to uz. Without knowing all these it is harder to help you

If this your query?

Listview set up:

ListView1: Original course list (e.g., selected courses)

ListView2: Another list to compare with ListView1

ListView3: Shows the difference between ListView2 and ListView1 (i.e., items present in ListView2 but not in ListView1)

What you want?
If i m currect, When a user clicks on an item in ListView3 (which is a course code), they want to display the associated "Hours" value that comes from the comparison dataset (likely from the JSON?

Store the json in a dictionary/list

Create a dictionary:

codeToHours = create empty dictionary
for each item in ListView2Source:
    set key = item.course_code
    set value = item.Hours
    add to dictionary

Compare and populate ListView3:

for each code in ListView2:
    if code not in ListView1:
        add to ListView3

On ListView3 item click:

when ListView3 .AfterPicking:
    selectedCode = ListView3.Selection
    hours = codeToHours[selectedCode]
    call Notifier.ShowMessageDialog("Hours: " + hours)