Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Im using the U7 grid data type package to do some repeated content. I need to sort these items and then take 1.
BUT, i get the following error when trying to sort:
'Newtonsoft.Json.Linq.JArray' does not contain a definition for 'OrderBy'
My code is as follows
@{ var afholdelser = CurrentPage.afholdelser.OrderBy("afholdelsdato"); foreach (var afholdelse in afholdelser) { <p>do stuff</p> }}
What am i doing wrong?
Hi Claushingebjerg
Do not use dynamic types for stuff like that.
If you want to use OrderBy -> try to do it with strongly typed objects.
What type of data are you storing in "afholdelser" property?
Thanks,
Alex
I dont recall. The question is 2 years old, but thanks for your reply.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
"'Newtonsoft.Json.Linq.JArray' does not contain a definition for" on list of nodes
Im using the U7 grid data type package to do some repeated content. I need to sort these items and then take 1.
BUT, i get the following error when trying to sort:
My code is as follows
What am i doing wrong?
Hi Claushingebjerg
Do not use dynamic types for stuff like that.
If you want to use OrderBy -> try to do it with strongly typed objects.
What type of data are you storing in "afholdelser" property?
Thanks,
Alex
I dont recall. The question is 2 years old, but thanks for your reply.
is working on a reply...