Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Claushingebjerg 729 posts 1824 karma points
    Nov 11, 2015 @ 09:09
    Claushingebjerg
    0

    "'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:

    '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?

  • Alex Skrypnyk 3895 posts 13826 karma points mvp
    5 days ago
    Alex Skrypnyk
    100

    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

  • Claushingebjerg 729 posts 1824 karma points
    5 days ago
    Claushingebjerg
    0

    I dont recall. The question is 2 years old, but thanks for your reply.

Please Sign in or register to post replies

Write your reply to:

Draft