Set a new field at the given path Parameters ---------- path: Path of the field to set, encoded as an array of field names value: The new value of the field
(self, path: list[str], value: Self)
| 10614 | return JSONValue(_ctx) |
| 10615 | |
| 10616 | def with_field(self, path: list[str], value: Self) -> Self: |
| 10617 | """Set a new field at the given path |
| 10618 | |
| 10619 | Parameters |
| 10620 | ---------- |
| 10621 | path: |
| 10622 | Path of the field to set, encoded as an array of field names |
| 10623 | value: |
| 10624 | The new value of the field |
| 10625 | """ |
| 10626 | _args = [ |
| 10627 | Arg("path", path), |
| 10628 | Arg("value", value), |
| 10629 | ] |
| 10630 | _ctx = self._select("withField", _args) |
| 10631 | return JSONValue(_ctx) |
| 10632 | |
| 10633 | def with_(self, cb: Callable[["JSONValue"], "JSONValue"]) -> "JSONValue": |
| 10634 | """Call the provided callable with current JSONValue. |