I have this json object saved to a variable in elsa workflow designer.
{
"users": {
"$type": "System.Collections.Generic.List`1[[System.Object, System.Private.CoreLib]], System.Private.CoreLib",
"$values": [
{
"$id": "3",
"$type": "System.Dynamic.ExpandoObject, System.Linq.Expressions",
"UsersID": 2,
"AssociatedUsersID": 51,
"UserEmail": "bob@Site.com",
"Title": "Manager",
"UserFirstName": "Bob",
"UserLastName": "Loblaw",
"NotificationTypes": {
"$type": "System.Collections.Generic.List`1[[System.Object, System.Private.CoreLib]], System.Private.CoreLib",
"$values": [
"Vendor Assigned"
]
}
}
]
}
}
I am trying to access the "$values" collection in the object for the "ForEach" activity in the designer, but I keep getting errors. Elsa's documentation is scant to say the least. Here's what I've tried so far:
getVariable('users')
getVariable('users').$values
getVariable('users')["$values"]
getVariable('users')['$values']
All result in errors. What am I doing wrong here?
If I just refer to the users variable I get this:
"name": "Items",
"value": {
"$type": "System.Collections.Generic.List`1[[System.Object, System.Private.CoreLib]], System.Private.CoreLib",
"$values": [
{
"$ref": "3"
}
]
}