Replies: 2 comments 1 reply
-
|
Beta Was this translation helpful? Give feedback.
0 replies
-
By "upsert" you mean appending to the end of the array? In that case, yes, I think we should implement |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I often find myself having a field that is optional and wanting to set data on that field. But to do that I first need to check if that field exists and for that I currently convert the node to a
view()
and then I check if it exists before initializing the field. See this example:It would be great if there was a
has()
operation on theObjApi
. Another idea could be maybe to have something like anupsert()
operation:Option 1:
Option 2:
Option 2 would already fail when trying to access the prop with
.arr("children")
so it would need to be a different API.Beta Was this translation helpful? Give feedback.
All reactions