watch in action:
Last active
June 8, 2024 08:32
-
-
Save cprima/5dad3b1e40a2731ab1b637f2ad15ba10 to your computer and use it in GitHub Desktop.
UiPath Studio expression: Recursively Join Dictionary(String, Object)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String.Join(", ", TransactionItem.SpecificContent.[Select](Function(kvp) _ | |
kvp.Key.Trim() & ": " & _ | |
If(TypeOf kvp.Value Is Dictionary(Of String, Object), _ | |
String.Join(", ", CType(kvp.Value, Dictionary(Of String, Object)).[Select](Function(y) _ | |
y.Key.Trim() & ": " & Convert.ToString(y.Value).Trim() _ | |
) _ | |
), _ | |
If(TypeOf kvp.Value Is DataTable, _ | |
"⚠ DataTable Encountered! ⚠", _ | |
Convert.ToString(kvp.Value).Trim() _ | |
) _ | |
) _ | |
)).Replace(" , ", ", ").Replace(", ,", ", ").Replace(Environment.NewLine & ", ", ", ").Replace(Environment.NewLine & Environment.NewLine, Environment.NewLine) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment