I have this weird json Array
[
[
]
]
How can I check whether this json arary is in this form or not?
I tried to check whether jsonArray.length() > 0
but for [[]]
this is giving me true
but I expect to be false
.
- How can I fix?
I have this weird json Array
[
[
]
]
How can I check whether this json arary is in this form or not?
I tried to check whether jsonArray.length() > 0
but for [[]]
this is giving me true
but I expect to be false
.
Copyright © 2021 Jogjafile Inc.
jsonArray will have a size of one as it has an empty array inside it. So, you can use this condition to check for nested empty array [ [ ] ].