Description
Select every explicit INI observation matching an exact section and key bank, preserving duplicates and occurrence provenance rather than choosing a winner.
INI-like configuration formats vary between applications. In this tool family, assignments are explicit section/name/value records and the empty section string means global scope. Duplicate-key policies, case handling and preservation of comments are separate choices rather than one universal INI behavior.
Select every explicit INI observation matching an exact section and key bank, preserving duplicates and occurrence provenance rather than choosing a winner.
When to use this tool
Use this tool to select every explicit INI observation matching an exact section and key bank, preserving duplicates and occurrence provenance rather than choosing a winner.
How to use the tool and how it works
- Enter recordsJson, section, keys using the field definitions below. For JSON text, serialize the explicit records in the shown shape.
- Run the operation. Correct input errors before interpreting an output.
- Read result.records. Use the ordering, boundary rules and absence conditions described below.
Select assignment records with the exact requested section and a name appearing in keys, retaining their original indexes.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| recordsJson | JSON text encoding array of {section: string, name: string, value: string}. Keep the record keys and value types shown in the decoded example below. | Text, at most 8,192 UTF-16 code units; the operation’s grammar also applies. |
| section | Exact section name; the empty string represents global records where allowed. | Text, at most 8,192 UTF-16 code units; the operation’s grammar also applies. |
| keys | Exact key names to select. | Dense list of at most 128 strings, each at most 8,192 UTF-16 code units. |
These are the decoded structures used in the example’s JSON text fields. Supply the corresponding serialized JSON strings as input.
{
"recordsJson": [
{
"section": "a",
"name": "x",
"value": "1"
},
{
"section": "a",
"name": "x",
"value": "2"
},
{
"section": "b",
"name": "x",
"value": "3"
}
]
} | Output field | Interpretation |
|---|---|
| result | Object containing the named fields below. |
| result.records | Selected, renamed or resolved assignment records with the provenance fields described above. |
{
"input": {
"recordsJson": "[{\"section\":\"a\",\"name\":\"x\",\"value\":\"1\"},{\"section\":\"a\",\"name\":\"x\",\"value\":\"2\"},{\"section\":\"b\",\"name\":\"x\",\"value\":\"3\"}]",
"section": "a",
"keys": [
"x"
]
},
"output": {
"result": {
"records": [
{
"section": "a",
"name": "x",
"value": "1",
"index": 0
},
{
"section": "a",
"name": "x",
"value": "2",
"index": 1
}
]
}
}
} Limitations and assumptions
- Repeated records remain separate and key matching is case-sensitive.
- Assignment records contain section, name and value strings. Nonempty section/key names cannot have surrounding whitespace, brackets or CR/LF/NUL. Values cannot contain CR/LF/NUL; a key cannot contain equals. No implicit interpolation or typed-value conversion is performed.
- Every declared top-level input field is required and unexpected fields are rejected. Ordinary strings are limited to 8,192 UTF-16 code units and lists to 128 entries, with tighter operation-specific bounds where stated. JSON text has bounded nesting and node counts.
- Numeric outputs must be finite and no larger in absolute magnitude than the safe-integer limit; operations returning exact large integers use decimal text. Positions are zero-based and spans end exclusively unless the operation explicitly states a different convention.
Alternative or Complementary methods
Select the consuming application’s dialect and duplicate-key policy explicitly. Use a lossless configuration editor when comments, original spacing, quoting or application-specific interpolation must be preserved.
References
Similar or alternative tools
- INI Global Key Section Partition
Partition explicit INI key observations between the unsectioned global namespace and named sections; preserves original records, duplicates and empty values.
- INI Section Key Case Collision Audit
Audit INI section/key spelling collisions under an explicit JavaScript lowercase policy, distinct from repeated identical spellings; not a universal INI case rule.