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
So I am a bit to green at Umbraco 8 - but is still holding a course in WCMS:es with Umbraco as an important player...
Tomorrow my lesson planing is "go 'headless'" but I'm stuck in a rut.
"Headless Umbraco 8" is not here yet, looked at the Headrest-library, but it looked complicated to me.
Wanted to try a simple solution like this one:
but can't get it to work in Umbraco 8.2... Any breaking changes/simple rewrite of this little gist I could use?
Any help much appreciated!
Maybe this will work for you:
Layout = null;
Response.ContentType = "application/json";
dynamic exObj = new ExpandoObject();
var dictionary = exObj as IDictionary<string, object>;
Model.Properties.ToList().ForEach(p => dictionary[p.Alias] = p.GetValue());
Let me know if it helps or no
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted