We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eb847d1 commit 3c949efCopy full SHA for 3c949ef
src/main.rs
@@ -1062,6 +1062,23 @@ impl Executor {
1062
}
1063
1064
1065
+ // Modify the property of object
1066
+ "modify" => {
1067
+ let data = self.pop_stack();
1068
+ let property = self.pop_stack().get_string();
1069
+ match self.pop_stack() {
1070
+ Type::Object(name, mut value) => {
1071
+ value
1072
+ .entry(property)
1073
+ .and_modify(|value| *value = data.clone())
1074
+ .or_insert(data.clone());
1075
+
1076
+ self.stack.push(Type::Object(name, value))
1077
+ }
1078
+ _ => self.stack.push(Type::Error("not-object".to_string())),
1079
1080
1081
1082
// Get all of properties
1083
"all" => match self.pop_stack() {
1084
Type::Object(_, data) => self.stack.push(Type::List(
0 commit comments