+ let parentKey : string = null;
+ if (property instanceof DerivedFEProperty) {
+ if (property.valueObj != '') {
+ if (key != '') {
+ let listIndex = Number(key);
+ if (!isNaN(listIndex)) {
+ this.toscaPath.push(key);
+ } else {
+ let newIndex = Object.keys(property.valueObj).findIndex(valueKey => (valueKey == key));
+ this.toscaPath.push(newIndex.toString());
+ }
+ } else {
+ let toscaIndex = Object.keys(property.valueObj).sort().reverse()[0];
+ this.toscaPath.push((Number(toscaIndex) + 1).toString());
+ }
+ } else {
+ this.toscaPath.push((property.valueObj.length).toString());
+ }
+ } else {
+ if (property instanceof PropertyFEModel && property.valueObj != '') {
+ if (key != '') {
+ parentKey = key;
+ }else{
+ let toscaIndex = Object.keys(property.valueObj).sort().reverse()[0];
+ parentKey = (Number(toscaIndex) + 1).toString();
+ }
+ } else {
+ parentKey = "0";
+ if (property instanceof PropertyFEModel) {
+ parentKey = (property.flattenedChildren.length).toString();
+ }
+ }
+ this.toscaPath.push(parentKey);
+ }
+ if (property.schemaType != PROPERTY_TYPES.MAP) {
+ this.mapKey = parentKey;
+ }