I currently have a list structured like this
let array = [
{ url: 'url1'},
{ url: 'url2/test', children: [{url: 'url2/test/test'}, {url: 'url2/test2/test'}],
{ url: 'url3', children: [{url: 'url3/test3/test3}, {url: 'url3/test3/test1'}], children: [{url: 'url3/test3/test1/test5'}]},
{ url: 'url4', children: [{url: 'url4/test4/test4'}, {url: 'url: 'url4/test4/test4'}]]
and there is also an input string that represents a URL (e.g url: 'url3/test3/test1').
My goal is to verify if the input URL exists in the list without resorting to the usage of a for loop. (perhaps using map, some, filter or other functions..)
Can anyone provide guidance on how I can accomplish this task?
I am trying to determine if the