Skip to content

Commit 3c48f26

Browse files
committed
fix parent_path
1 parent 0302cb4 commit 3c48f26

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ fn convert_code(input: &str) -> String {
121121
}
122122
//final path for type checki
123123
if let Some(last_key) = keys.last() {
124+
let parent_path = path.clone();
125+
checks.push(format!("('{}' in {})", last_key, parent_path));
124126
path += &format!("[\'{}\']", last_key);
125127
checks.push(format!("({} =~ Array)", path));
126128
}

0 commit comments

Comments
 (0)