假设我有一个对象:
[
{
'title': "some title"
'channel_id':'123we'
'options': [
{
'channel_id':'abc'
'image':'http://asdasd.com/all-inclusive-block-img.jpg'
'title':'All-Inclusive'
'options':[
{
'channel_id':'dsa2'
'title':'Some Recommends'
'options':[
{
'image':'http://www.asdasd.com' 'title':'Sandals'
'id':'1'
'content':{
...
Run Code Online (Sandbox Code Playgroud)
我想找到id为1的一个对象.是否有类似这样的函数?我可以使用Underscore的_.filter方法,但我必须从顶部开始并过滤掉.