I need a Java code
Orçamento $10-30 USD
We have a JSON object given below.
{"label":"Country","value":"1","children":[{"label":"USA","value":"2","children":[{"label":"AZ","value":"3","children":[{"label":"Tempe","value":"4","children":[{"label":"Cotton","value":"5","children":[{"label":"Lake","value":"6","leaf":true},{"label":"Sweet","value":"7","leaf":true}]},{"label":"Sun","value":"9","leaf":true}]},{"label":"Mesa","value":"11","leaf":true}]},{"label":"LV","value":"13","children":[{"label":"Casino","value":"17","leaf":true},{"label":"Fountain","value":"19","leaf":true}]}]},{"label":"Mexico","value":"21","children":[{"label":"Guad","value":"7","leaf":true},{"label":"Puerto","value":"3","children":[{"label":"Beach","value":"4","leaf":true},{"label":"Sand","value":"5","leaf":true}]}]}]}
Need to iterate in Java in such a way that for the object whose "leaf" attribute is TRUE, we have to take the "id" attribute to check if it's an ODD number or not.
If it is an ODD number then add
"children": [
{
"label": "Fish",
"value": "420"
},
{
"label": "Duck",
"value": "420"
}
]
to that object.
So as per this logic, the JSON will become
{"label":"Country","value":"1","children":[{"label":"USA","value":"2","children":[{"label":"AZ","value":"3","children":[{"label":"Tempe","value":"4","children":[{"label":"Cotton","value":"5","children":[{"label":"Lake","value":"6","leaf":true,"children":[{"label":"Fish","value":"420"},{"label":"Duck","value":"420"}]},{"label":"Sweet","value":"7","leaf":true,"children":[{"label":"","value":""}]}]},{"label":"Sun","value":"9","leaf":true,"children":[{"label":"","value":""}]}]},{"label":"Mesa","value":"11","leaf":true,"children":[{"label":"","value":""}]}]},{"label":"LV","value":"13","children":[{"label":"Casino","value":"17","leaf":true,"children":[{"label":"","value":""}]},{"label":"Fountain","value":"20","leaf":true,"children":[{"label":"Fish","value":"420"},{"label":"Duck","value":"420"}]}]}]},{"label":"Mexico","value":"21","children":[{"label":"Guad","value":"7","leaf":true,"children":[{"label":"","value":""}]},{"label":"Puerto","value":"3","children":[{"label":"Beach","value":"4","leaf":true,"children":[{"label":"Fish","value":"420"},{"label":"Duck","value":"420"}]},{"label":"Sand","value":"5","leaf":true,"children":[{"label":"","value":""}]}]}]}]}
23 freelancers estão ofertando em média $30 nesse trabalho
Hi there, I do Java programming. I went through your requirements and I would like to do this project if given the opportunity. Let me know if you are interested.
Hi I am an expert Java developer with over 4 years of development experience. I can build you this simple app in 3 days. Let's discuss it over chat Regards
Hi Greetings I can do this for you with java spring application using jackson library , it would rest api i hope Regards
Hi, Hope you are doing well, I went through your requirements, I am pretty much confident that I can complete this task as I am expert in Java, Json and I have done similar kind of projects already and deliver in few h Mais
Hello? How are you? Thanks for posting this job. I am a Senior Java developer with 8+ years experience in JavaFX and Java Swing. I have been doing this kind of Java projects many times. Please let me know. Best Regards
Hi I have seen your job description and interested in work of java project. Please provide more details about the work. Best
Hello, I have worked on JSON objects in Java. I have 4+ years of experience working as a java developer. I can complete this project within given time. Please discuss the details over chat. Thank you.
Hi, I have around 8+ yrs of exp. in java/j2ee and mainly worked in java8, Spring boot, Spring MVC, JPA/Hibernate, RDBMS and NoSQL databases. We can discuss more details over the chat.
Hi, Hope You are fine sir. I can Provide You Solution. Your Satisfaction is my first priority sir. my projects include: [login to view URL] [login to view URL]
Hi esteemed client, Did you know accurate bug free code is not sheer luck but 100% work effort from an experienced developer? I am here to confidently ascertain that I will assist in the fixing the Json object and ap Mais
I am a java full stack developer. As i have experience in developing java back end codes and working with json data. I can easily complete your requirements. It's fact that it will be my first project on this site. I w Mais
Hello, I am a professional Java developer with 6 years of experience in Java related technologies. I have worked in multiple projects from multiple domains with hands-on experience in Java8 SpringBoot Microservices AWS Mais
Hi. I can accept right now and can do this in 2hr. I've read your requirements very carefully and I have a good idea. I have 7+years of great experience in Java Spring Boot, Java Plugin. So more specifically my skills Mais
hello. I have a lot of experience working with json objects. for convenience, I prefer written communication and only on this site.
Hi, I am Atul Sontakke. I have 2.5 years of experience with Java. I also work on JSON databases. I will finish project as soon as you required. Thank you
I have 5+ years of experience in Java and rest API. I have handled JSON object in past.I’m interested to hear more about the project. If you award me the project, I’d be pleased to discuss this further and get started Mais
Hi sir/madam, I am a Spring boot developer, I had done many projects in Spring boot, I know to integrate Spring boot with email and SMS service and also web socket connection, I know to deploy the Spring boot in herok Mais
I have a lot of experience with JSON documents. I often worked with test data which is usually present in JSON files.
Hello sir, I checked your requirements and I am interested to work with you for this project. I think my experience makes me the right person for this job.