I am creating a RESTful web service in Java. There is an array of objects in my Java implementation that I need to pass to the client side via JSON.
I need to create an array of objects in JSON assigned by the Java objects array.
Can I use a for loop
for this assignment? If I can, then what will the syntax be?