[Solved] Comparing two list of objects and forming a new list by comparing one property of two list in java 8 [closed]

You want intersection of the list while saving of first list type. Get the common field values in the Set. valuesToCheck=secondList.stream().map(SecondListObject::commonFiled).collect(Collectors.toList); ”’ Apply a stream on the first while filtering based on the matching common field value in the set built in the previous step. firstList.stream().filter(x->valuesToCheck.contains(x.getCommonFiled)).collect(toList) You got the gist. 1 solved Comparing two list … Read more

[Solved] How to create dynamic lists from a json in javascript?

This might work, I have broken it down to simple functions so you can understand what is happening here. var job_execs = [{ “build_id”: 12, “job”: { “name”: “test_job” }, “product”: { “name”: “new_product” }, “time_start”: “2017-08-29T01:01:19.314000-07:00”, “time_end”: “2017-08-29T01:17:07.990000-07:00”, “status”: { “name”: “SUCCESS” }, “stage_executions”: [{ “stage”: { “name”: “stage-checkout” }, “status”: { “name”: “SUCCESS” … Read more