Commit 9e1ce589 authored by Matthieu Benoist's avatar Matthieu Benoist
Browse files

Complex data corrections for string array

parent 4e985f28
...@@ -22,6 +22,12 @@ export class DatasetDataDetailsComponent implements OnInit { ...@@ -22,6 +22,12 @@ export class DatasetDataDetailsComponent implements OnInit {
} catch (err) { } } catch (err) { }
} }
} }
else if (Array.isArray(properties[key])) {
try {
const parsed = JSON.parse(properties[key]);
properties[key] = parsed;
} catch (err) { }
}
} }
this._properties = properties; this._properties = properties;
} }
......
...@@ -284,7 +284,8 @@ export class DatasetDetailService { ...@@ -284,7 +284,8 @@ export class DatasetDetailService {
var fieldtype = field + '_' + eval(`this._dataset.fields.types.${field}`); var fieldtype = field + '_' + eval(`this._dataset.fields.types.${field}`);
newDataPropertiesOrder[field] = data.properties[fieldtype] ? data.properties[fieldtype] : newDataPropertiesOrder[field] = data.properties[fieldtype] ? data.properties[fieldtype] :
data.properties[field] ? data.properties[field] : data.properties[`${field}_json`] ? data.properties[field] ? data.properties[field] : data.properties[`${field}_json`] ?
data.properties[`${field}_json`] : ''; data.properties[`${field}_json`] : data.properties[`${field}_str`] ?
data.properties[`${field}_str`] : '';
}); });
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment