fcf.normalizeObjectAddress() function
Package: fcf-framework-core
File: fcf-framework-core:fcf.js
Available from version: 2.0.2
Normalizes the path address to a subfield of an object
Arguments
- Source address path to subfield
Result
- Normalized address path
Example: Function application
{
let address = fcf.normalizeObjectAddress("field1.field2");
console.log(address)
}
{
let address = fcf.normalizeObjectAddress("field1[field2]");
console.log(address)
}
{
let address = fcf.normalizeObjectAddress(["field1", "field2"]);
console.log(address)
}
{
let address = fcf.normalizeObjectAddress(["field1", {part: "field2", array: true}]);
console.log(address)
}
Output:
["field1"]["field2"]
["field1"]["field2"]
["field1"]["field2"]
["field1"][["field2"]]