letmuttest_inner_array=Value::Null;test_inner_array.dot_set("name",Value::String(String::from("Google"))).unwrap();assert_eq!(json!({"name": "Google"}),test_inner_array);test_inner_array.dot_set("todos.+",Value::String(String::from("Go to class"))).unwrap();assert_eq!(json!({"name": "Google","todos": ["Go to class"]}),test_inner_array);test_inner_array.dot_set("todos.+",Value::String(String::from("Fish"))).unwrap();assert_eq!(json!({"name": "Google","todos": ["Go to class","Fish"]}),test_inner_array);letarray=vec![Value::String(String::from("Gold")),Value::String(String::from("Fish"))];test_inner_array.dot_set("todos.*",Value::Array(array)).unwrap();assert_eq!(json!({"name": "Google","todos": ["Fish","Gold","Go to class"]}),test_inner_array);
Adding an array merge special symbol (*).
proposal:
```rust
let mut test_inner_array = Value::Null;
test_inner_array.dot_set("name", Value::String(String::from("Google"))).unwrap();
assert_eq!(json!({"name" : "Google"}), test_inner_array);
test_inner_array.dot_set("todos.+", Value::String(String::from("Go to class"))).unwrap();
assert_eq!(json!({"name" : "Google", "todos" : ["Go to class"] }), test_inner_array);
test_inner_array.dot_set("todos.+", Value::String(String::from("Fish"))).unwrap();
assert_eq!(json!({"name" : "Google", "todos" : ["Go to class","Fish"] }), test_inner_array);
let array = vec![Value::String(String::from("Gold")),Value::String(String::from("Fish"))];
test_inner_array.dot_set("todos.*", Value::Array(array)).unwrap();
assert_eq!(json!({"name" : "Google", "todos" : ["Fish","Gold","Go to class"] }), test_inner_array);
```
That's not possible without restricting dot_set to PartialEq types, I don't want to do that - and you would have to implement all the other set operations for completeness as well.
You can currently do this using the dot_get_mut() method
That's not possible without restricting `dot_set` to `PartialEq` types, I don't want to do that - and you would have to implement all the other set operations for completeness as well.
You can currently do this using the `dot_get_mut()` method
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Adding an array merge special symbol (*).
proposal:
That's not possible without restricting
dot_settoPartialEqtypes, I don't want to do that - and you would have to implement all the other set operations for completeness as well.You can currently do this using the
dot_get_mut()methodok i understand, i though it will more complete with the merge feature.
Thanks