Get type information for a property from a schema
The name of the property
The schema containing the property
Property type information or undefined if property not found
const schema = { type: 'object', properties: { name: { type: 'string' }, age: { type: 'number' } }};const nameType = getSchemaTypeForProperty('name', schema);// { type: 'string', isArray: false, isObject: false, schema: {...} } Copy
const schema = { type: 'object', properties: { name: { type: 'string' }, age: { type: 'number' } }};const nameType = getSchemaTypeForProperty('name', schema);// { type: 'string', isArray: false, isObject: false, schema: {...} }
Get type information for a property from a schema