mysql - How to parse every object in my array in json in java without using loop? -


i have data in json format :

{   "father" :"conor",   "children" : [       {           "name":"cindy",           "age": 11       },       {           "name":"heart",           "age" :12       },       {           "name":"cindy",           "age" :13       }   ] } 

my problem how going check every object in array children if there name , age field. currently, looped out check if 2 field supplied/exist, slows down app(especially when inserting database). there way don't have loop out?

you can use jsonpath api in java code , provides various filters on stream of json array. can give try

https://github.com/json-path/jsonpath


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

.htaccess - ERR_TOO_MANY_REDIRECTS htaccess -