In js/typescript, if I have an interface like this
interface B {
   bar:string;
}
interface A {
   foo:string;
   bar:B;
}
and then I have a abstract JS object like this
const r = await fetch("https://mylink.com");
const d = await r.json();
Is there a way to do something like
const matches:boolean = Matches(d, A);
which then is a boolean telling me if it is an exact match or not?
Thanks