DEV Community

devanshi2806
devanshi2806

Posted on

Java - ArrayList object looping through multiple values and keys

I'm new to Java and I'm making Following json by using a single arraylist with for loop and if statement.I want to use dynamic forloop.But I'm stuck with my for loop logic part.

Here is my java program.

main.java

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;

public class

Top comments (0)