一个JSON的解析问题,具体是这个JSON有3个组,每个组又嵌套几个组!这3个组不固定,有可能出现1个组,有可能出现2个组,我想在结果中排除vip组,然后的到usable_count值最大这个小组里面的参数
{"btn_status":1,"btn_text":"请选择","code":1,"data":[{"usable_count":251,"max_price":"320.00","min_price":"150.00","region":1,"list":[{"usable_count":15,"price":"150.00","estate":1,"name":"101","id":1},{"usable_count":44,"price":"150.00","estate":2,"name":"102","id":2},{"usable_count":48,"price":"220.00","estate":31,"name":"131","id":31}],"name":"南面"},{"usable_count":31,"max_price":"888.00","min_price":"888.00","region":3,"list":[{"usable_count":13,"price":"888.00","estate":1,"name":"VIP1","id":1},{"usable_count":17,"price":"888.00","estate":3,"name":"VIP3","id":3}],"name":"VIP"},{"usable_count":22,"max_price":"150.00","min_price":"100.00","region":6,"list":[{"usable_count":35,"price":"100.00","estate":3,"name":"503","id":3},{"usable_count":24,"price":"120.00","estate":20,"name":"520","id":20},{"usable_count":3,"price":"100.00","estate":21,"name":"521","id":21},{"usable_count":22,"price":"100.00","estate":22,"name":"522","id":22},{"usable_count":54,"price":"150.00","estate":35,"name":"535","id":35}],"name":"顶层看台"}],"msg":"获取成功","max_num":2,"type_code":1} 这是格式1
{"btn_status":1,"btn_text":"请选择","code":1,"data":[{"usable_count":1,"max_price":"888.00","min_price":"888.00","region":3,"list":[{"usable_count":"1","price":"888.00","estate":1,"name":"VIP1","id":1}],"name":"VIP"},{"usable_count":1,"max_price":"100.00","min_price":"100.00","region":6,"list":[{"usable_count":"1","price":"100.00","estate":5,"name":"505","id":5},{"usable_count":37,"price":"100.00","estate":6,"name":"506","id":6},{"usable_count":55,"price":"100.00","estate":7,"name":"507","id":7},{"usable_count":62,"price":"120.00","estate":8,"name":"508","id":8}],"name":"南面"}],"msg":"获取成功","max_num":2}这是格式2
{"btn_status":1,"btn_text":"请选择","code":1,"data":[{"usable_count":1,"max_price":"150.00","min_price":"150.00","region":1,"list":[{"usable_count":"1","price":"150.00","estate":4,"name":"104","id":4},{"usable_count":388,"price":"150.00","estate":8,"name":"108","id":8},{"usable_count":360,"price":"180.00","estate":9,"name":"109","id":9},{"usable_count":434,"price":"180.00","estate":10,"name":"110","id":10}],"name":"北面"},{"usable_count":2,"max_price":"888.00","min_price":"888.00","region":3,"list":[{"usable_count":"1","price":"888.00","estate":1,"name":"VIP1","id":1},{"usable_count":"1","price":"888.00","estate":3,"name":"VIP3","id":3}],"name":"VIP"}],"msg":"获取成功","max_num":2}这是格式3
{"btn_status":1,"btn_text":"请选择","code":1,"data":[{"usable_count":1,"max_price":"150.00","min_price":"150.00","region":1,"list":[{"usable_count":"1","price":"150.00","estate":4,"name":"104","id":4},{"usable_count":388,"price":"150.00","estate":8,"name":"108","id":8},{"usable_count":360,"price":"180.00","estate":9,"name":"109","id":9},{"usable_count":434,"price":"180.00","estate":10,"name":"110","id":10}],"name":"北面"},{"usable_count":2,"max_price":"888.00","min_price":"888.00","region":3,"list":[{"usable_count":"1","price":"888.00","estate":1,"name":"VIP1","id":1},{"usable_count":"1","price":"888.00","estate":3,"name":"VIP3","id":3}],"name":"VIP"}],"msg":"获取成功","max_num":2}这是格式4
|