toSchemaOrgJsonLd

Transform source json data into the specified schema.org json-ld type, removing any fields that are not part of the schema or has invalid type

toSchemaOrgJsonLd(json: any, type: string, context?: any)

Parameters:

(Required) json: Any json data

(Required) type: schema.org type

(Optional) context: Json-ld context

Examples