I have an object and an array of urls.
example array:
['http://airbnb.design/feed/','http://nautil.us/rss/all']
example object:
{
"attr": { "version": "1.1" },
"head": [{ "title": ["some opml"] }],
"body": [
{
"outline": [
{
"attr": { "text": "Design", "title": "Design" },
"outline": [
{ "attr": { "text": "Airbnb Design", "title": "Airbnb Design", "description": "", "type": "rss", "version": "RSS", "htmlUrl": "https://airbnb.design/", "xmlUrl": "http://airbnb.design/feed/" } },
{ "attr": { "text": "web.dev: Blog", "title": "web.dev: Blog", "description": "", "type": "rss", "version": "RSS", "htmlUrl": "https://web.dev/blog/", "xmlUrl": "https://web.dev/feed.xml" } }]
},
{
"attr": { "text": "Science", "title": "Science" },
"outline": [
{ "attr": { "text": "Nature", "title": "Nature", "description": "", "type": "rss", "version": "RSS", "htmlUrl": "http://feeds.nature.com/nature/rss/current", "xmlUrl": "http://www.nature.com/nature/current_issue/rss" } },
{ "attr": { "text": "Nautilus", "title": "Nautilus", "description": "", "type": "rss", "version": "RSS", "htmlUrl": "", "xmlUrl": "http://nautil.us/rss/all" } }]
}
]
}
]
}
I want to remove the containing object when the xmlUrl matches (ie. the urls don't work, so exclude/remove them)
I see I can do something like **[xmlUrl!='http://nautil.us/rss/all']
but that only returns an array excluding the object containing the url.
Using a javascript function became somewhat convoluted because of the nested properties and was hoping that jsonata could make quick work of this...if I only would understand it :')