Anyone know if there's a way to get a list of the page layouts for an sObject type from a VF page? The API docs say there is a property called namedLayoutInfos. But javascript trying to reference that gave me undefined.
<apex:page >
<script src="../../soap/ajax/40.0/connection.js"
type="text/javascript"></script>
<script>
sforce.connection.sessionId = "{!$Api.Session_ID}";
var testMe = sforce.connection.describeSObjects(["Account"]);
var accountMetadata = testMe[0];
var layoutInfos = accountMetadata.namedLayoutInfos;
</script>