I have a JSON like this:
{
"livingroom": [],
"bedroom": [],
"study": [
{
"name": "s0",
"thumbnail": "https://storage.googleapis.com/peterbucket/0/small_istagingViewer/sig@staging.com.tw/Cuiti/study/web/螢幕快照 2016-03-29 下午2.12.32.png",
"web": "https://storage.googleapis.com/peterbucket/istagingViewer/sigstaging.com.tw/Cuiti/study/web/201603292.12.32.png"
}
],
"outdoor": [],
"other": [],
"id": "-KE5spXGRjC_9WSIh_eN",
"name": "Cuiti",
"categoryCount": 1,
"panoramaCount": 1
}
I want to only exclude the []
s. I tried value.length > 0
but that throws an error because some of the values aren't arrays.
What's the best solution?