Skip to content

Instantly share code, notes, and snippets.

@kgiszewski
Created October 28, 2014 12:17
Show Gist options
  • Save kgiszewski/941c0cc6f42087efd0ac to your computer and use it in GitHub Desktop.
Save kgiszewski/941c0cc6f42087efd0ac to your computer and use it in GitHub Desktop.
@using Newtonsoft.Json;
@using Archetype.Models;
var myArchetype = JsonConvert.DeserializeObject<ArchetypeModel>(luceneResult.Fields[field]);//this has to be pure Archetype JSON
var firstFieldset = myArchetype.Fieldsets.FirstOrDefault();//assuming it's always one fieldset or less
if (firstFieldset != null)
{
<div>
firstFieldset.GetValue("somePropertyOfArchetype");
</div>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment