Java comparing two arrays with different structures but some similar items

Java comparing two arrays with different structures but some similar items

I would like to compare two arrays. I have the following

I would like to compare two arrays. I have the following

ArrayList<String> time_durations = new ArrayList<String>();

time_durations.add("1200-1304") time_durations.add("6-7")

Then the other array has the following structure

ArratList<FetchedData> apiresult = new ArrayList<FetchedData>();
apiresult.add(new FetchedData("1200-1304", //an array of data))

The class fetched data has

class FetchedData{
   private String duration_range;
   private ArrayList data;

//then setters and getters //and also a constructor

}

So i want to compare the two arrays and get all items contained in time_durations but not in apiresult

Samples of them both in a json format is

time_durations = ["1200-1304", "6-7"]
apiresult = [{duration_range:"1200-1304", data:["item1", "item 2"]}

So by comparison i expect it to return the item in array time_durations6-7 that is index 1

So i have tried

if (Arrays.equals(time_durations, apiresult)) {
    //this throws an error
 }

But the above attempt doesnt work and am stuck.How do i achieve this?

Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

Java Fundamentals: Learn Java for absolute beginners |Simpliv

Java Fundamentals: Learn Java for absolute beginners

Java Essentials : Learn Core Java From Basic to Advance

Learn Java Programming Using Practical Assignments. Start Building Back-end Web Applications Robust Test Automation Frameworks By End Of The Course. Learn More!

Fundamentos de Java: Aprende Java desde cero, sin misterios | Simpliv

Fundamentos de Java: Aprende Java desde cero, sin misterios