So I know this is old, but Community decided we should look at it today...
You can enumerate the subwebs and put all the urls as keys in an object, then check if the url was put into the object or not...
var myCtx = SP.ClientContext.get_current();
var mySubWebs = myCtx.get_web().getSubwebsForCurrentUser();
myCtx.load(mySubWebs);
myCtx.executeQueryAsync(function() {
var subWebEnum = mySubWebs.getEnumerator(),
webUrls = {},
currWeb;
while (subWebEnum.moveNext()) {
currWeb = subWebEnum.get_current();
webUrls[currWeb.get_url()] = true;
}
//following line for debugging in console
window.subWebs = webUrls;
}, function(sender, args) {
//failure handler
});
Then you can do things like subWebs['<absolute url>'] ? present : notPresent
or if(subWebs['<absolute url>'])
and make decisions based on that.
You do need to be on a page in the web where you are looking for subwebs in order for this to work.