Property InnerElements
- Namespace
- LMKit.Extraction
- Assembly
- LM-Kit.NET.dll
InnerElements
Gets the list of inner elements associated with this result element, based on the schema defined in the TextExtractionElement.
public IReadOnlyList<TextExtractionResultElement> InnerElements { get; }
Property Value
- IReadOnlyList<TextExtractionResultElement>
A read-only list of TextExtractionResultElement representing the structured subcomponents of the extracted value.
Examples
// Example for structured object
foreach (var subElement in resultElement.InnerElements)
{
Console.WriteLine($"{subElement.TextExtractionElement.Name}: {subElement.Value}");
}
// Example for array of objects
foreach (var item in resultElement.InnerElements)
{
Console.WriteLine($"Item: {item}");
}
Remarks
This property is useful when the extracted value is a structured object or an array of objects. If IsArrayOfObject is true, each item in the array is mapped to a new TextExtractionResultElement using its corresponding sub-schema. If the element has inner elements defined but is not an array, the property returns one TextExtractionResultElement per declared inner element, each initialized with its associated value.