Parse the JSON string value when fetching the metabib.wide_display_entry
data used to render the new Edition value.
Signed-off-by: Bill Erickson <berickxx@gmail.com>
setQuery : function(q) {
if (q) query = q;
return query;
+ },
+ itemRetrieved: function(item) {
+ // De-JSON-ify a wide display entry field.
+ // We don't use egBibDisplay.mwdeJSONToJS() since this
+ // is not a full "mwde" object. Instead it's a single
+ // non-multi-field, JSON-encoded value.
+ var edition = item['biblio_record.wide_display_entry.edition'];
+ item['biblio_record.wide_display_entry.edition'] =
+ edition ? JSON.parse(edition) : '';
}
};