Copied to clipboard

Flag this post as spam?

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


  • klaus 15 posts 35 karma points
    Jun 26, 2020 @ 18:04
    klaus
    0

    How to get the collection of nested objects?

    Hi

    I have a currentPage that returns a currentpage like this

    IPublishedContent currentPage = UmbracoContext.Content.GetById(1164);
    

    The currentPage has a property called ProductList. It is a collection of nested objects. How to i get those object? enter image description here

  • klaus 15 posts 35 karma points
    Jun 26, 2020 @ 18:24
    klaus
    0

    I got the answer from the documentation.

    https://our.umbraco.com/documentation/reference/querying/ipublishedcontent/Properties/#modelvaluetstring

    IEnumerable<object> y = currentPage.Value<IEnumerable<object>>("ProductList");
    
  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies