Question

I've a flow that performs a "for each" loop, extracts the current loop data and pases it to a Connector. The connector returns a different class of POJO.

Now, I set put a variable of the type LinkedList, and enrich said variable with each loop on the foreach. As I understand, now my LinkedList has an element with each of the different POJOs my connector passed.

My question is, when the for-each process ends, and my variable is enriched, how can I extract the values from it. Or my approach is incorrect? If I just print to the client (REST client) the results, it shows that it is a LinkedList... but don't don't know what to do from there. I'm thinking if there is a way to transform that to a JSON, or what approach is the best for my case.

Thank you so much!

Was it helpful?

Solution

After a lot of trial and error I found a way, but I don't know if it is the proper one:

#[mylinkedlist[mylinkedlist.size()-1].getXXXXX()]

That actually brings the info, obviously I can set the number of the element of the list, and it works fine. Is this the right approach, or there's something better (cleaner, efficient, standard, good looking)?

Thanks!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top