Closed G-Balamurugan closed 9 months ago
Hi @G-Balamurugan,
You can achieve it with such a transformation:
[
{
"operation": "modify-overwrite-beta",
"spec": {
"fullName": "=split('_', @(1,fullName))",
"a": "=elementAt(0,@(1,fullName))",
"b": "=elementAt(1,@(1,fullName))"
}
},
{
"operation": "remove",
"spec": {
"fullName": ""
}
}
]
PS: be careful with the extra space after the comma in @(1, fullName)
, it will not work
Thank you
Why it is not possible to fetch the element from the split list Input : { "fullName": "hello_world_bye" }
Rule : [ { "operation": "modify-overwrite-beta", "spec": { "fullName": "=split('_', @(1, fullName))", "a": "=fullName[1]", "b": "=fullName[2]" } }, { "operation": "remove", "spec": { "fullName": "" } } ]
here I am trying to split the element and trying to fetch , particular index element alone How to perform that