getByDomain
The getByDomain function filters items by their assessment domain and returns them with sequential order IDs.
Syntax
Section titled “Syntax”{input | getByDomain:domain}Parameters
Section titled “Parameters”input(object): An object containing items withassessment_domainpropertydomain(string): The domain to filter by
Returns
Section titled “Returns”An object containing:
items: Array of filtered items, each with an addedorder_idproperty (starting from 1)hasItems: Boolean indicating if any items were found
Examples
Section titled “Examples”Basic domain filtering
Section titled “Basic domain filtering”{assessments | getByDomain:"Network"}// Returns: {// items: [// { ...item1, order_id: 1 },// { ...item2, order_id: 2 }// ],// hasItems: true// }Check if domain has items
Section titled “Check if domain has items”{findings | getByDomain:"Web Application" | get:"hasItems"}// Returns: true or falseGet filtered items
Section titled “Get filtered items”{controls | getByDomain:"Physical Security" | get:"items"}// Returns array of physical security controls with order_idEmpty result
Section titled “Empty result”{items | getByDomain:"NonExistent"}// Returns: { items: [], hasItems: false }Using in tables
Section titled “Using in tables”{vulnerabilities | getByDomain:"Infrastructure" | get:"items"}// Returns ordered list of infrastructure vulnerabilitiesUse Cases
Section titled “Use Cases”- Organizing assessment findings by domain
- Creating domain-specific report sections
- Filtering security controls by category
- Building ordered lists for specific domains
- Conditional rendering based on domain presence
Special Features
Section titled “Special Features”- Automatically adds sequential
order_idto each filtered item - Preserves all original item properties
- Provides boolean flag for easy conditional checks
- Maintains order of items as they appear in the input object