hemal
(Miss. hemal)
1
Hi Everyone,
I don’t know what happened to this Forum. No one is answering
Can anyone please help me that why I am not able to use LinQ expressions ?
Example , ```
List keys = inner.Properties().Select(p => p.Name).ToList();
that's what I am using in my assign activity. Help me please.
Regards,
Hemal
ppr
(Peter Preuss)
2
@hemal
You are using the C# Syntax but in UiPath WE are using the VB.net Syntax
In your Case IT would Look Like this
Inner.Properties.select(function (x) x.Name).ToList
1 Like
hemal
(Miss. hemal)
3
Hi @ppr,
Still I am getting error as I am not getting Name. Please help
Regards,
Hemal
@hemal Can you post the Error that you get and also post the Screenshot of how you have used that expression ?
hemal
(Miss. hemal)
5
@supermanPunch
Where error is like, Lambda expression cannot be ‘Integer’ because ‘Integer’ is not a delegate type.
Regards,
Hemal
@hemal You don’t need to assign the type to x again, you can just keep it as x.
hemal
(Miss. hemal)
7
@supermanPunch,
But then I am not getting jsonobject properties → function(x).Name.
I am not getting Name then.
Regards,
Hemal
hemal
(Miss. hemal)
8
Here, JSONData.Properties(Function ( x) x.).ToList unable to get any properties then
@hemal What’s the Type of JSONData ?
hemal
(Miss. hemal)
10
@supermanPunch,
Newtonsoft.Json.Linq.JObject
@hemal I think the Linq Expression Should be modified a bit to this :
JSONData.Properties.Select(Function(x)x.Name).ToList
2 Likes
hemal
(Miss. hemal)
12
@supermanPunch,
I think there was the space issue right ? Thank you so much
Regards,
Hemal
1 Like
system
(system)
Closed
13
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.