How to increase the value of index inside an object using $ADD
#1671
Unanswered
avfigueredo
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have this field called
bookedByBatch
such as is an object compound with a string index and a numeric value. So I'd like to increment by 1 just a specific index of this object, for example, the index4
, and I'm trying using the code below,The problem is, the query runs, but the dynamoose is creating the field
bookedByBatch.4: 1
instead of adds 1 to the objectbookedByBatch
index4
.It should save like this
How can I fix this?
Beta Was this translation helpful? Give feedback.
All reactions